Ir para conteúdo

Arquivado

Este tópico foi arquivado e está fechado para novas respostas.

fpimenta

maldito codigo

Recommended Posts

ola pessoal estou me descabelando com esse codigo, gostaria de o pessoal mais experiente desse uma olhada nisso obrigado<html><head><title>Untitled Document</title><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"></head><body><?php$conexao = mysql_connect('localhost','fabner','pimenta');if($conexao==NULL){ echo "A conexão não pode ser feita!!";}else { $banco = mysql_select_db('locadora'); if($banco=NULL) { echo "O banco não poe ser selecionado"; } else { $dir = '/home/fabner/public_html/images/'; print "<pre>"; if(move_uploaded_file($_FILES['arquivo']['tmp_name'], $dir . $_FILES['arquivo']['name'])) { echo "<html>"; echo "<head>"; echo "<title>Untitled Document</title>"; echo "<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'>"; //echo "<meta http-equiv='refresh' content='5;URL=insert.htm'>"; echo "</head>"; echo "<body bgcolor='#000000' text='#FF0000'>"; echo "<br>"; echo "<br>"; echo "<table width='52%' border='1' align='center' bordercolor='#FF0000' bgcolor='#660000'>"; echo "<tr>"; echo "<td><div align='center'><strong><font size='7'>O cadastramento da imagem foi feito com sucesso! </font></strong> </div></td>"; echo "</tr>"; echo "</table>"; echo "<strong><font size='6'> </font></strong>"; echo "</body>"; echo "</html>"; $imagem = $_FILES['arquivo']['name']; } else { echo "<html>"; echo "<head>"; echo "<title>Untitled Document</title>"; echo "<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'>"; //echo "<meta http-equiv='refresh' content='5;URL=insert.htm'>"; echo "</head>"; echo "<body bgcolor='#000000' text='#FF0000'>"; echo "<br>"; echo "<br>"; echo "<table width='52%' border='1' align='center' bordercolor='#FF0000' bgcolor='#660000'>"; echo "<tr>"; echo "<td><div align='center'><strong><font size='7'>O cadastramento da imagem não foi feito! </font></strong> </div></td>"; echo "</tr>"; echo "</table>"; echo "<strong><font size='6'> </font></strong>"; echo "</body>"; echo "</html>"; } $grava = mysql_query("insert into novidade(codigo,titulo,categoria,data,sinopse,imagem) values('$codigo','$titulo','$categoria','$data','$sinopse','$imagem')", $conexao); if($grava==NULL) { echo "<html>"; echo "<head>"; echo "<title>Untitled Document</title>"; echo "<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'>"; echo "<meta http-equiv='refresh' content='5;URL=insert.htm'>"; echo "</head>"; echo "<body bgcolor='#000000' text='#FF0000'>"; echo "<br>"; echo "<br>"; echo "<table width='52%' border='1' align='center' bordercolor='#FF0000' bgcolor='#660000'>"; echo "<tr>"; echo "<td><div align='center'><strong><font size='7'>O cadastramento dos dados não pode ser feito! </font></strong> </div></td>"; echo "</tr>"; echo "</table>"; echo "<strong><font size='6'> </font></strong>"; echo "</body>"; echo "</html>"; } else { echo "<html>"; echo "<head>"; echo "<title>Untitled Document</title>"; echo "<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'>"; echo "<meta http-equiv='refresh' content='5;URL=insert.htm'>"; echo "</head>"; echo "<body bgcolor='#000000' text='#FF0000'>"; echo "<br>"; echo "<br>"; echo "<table width='52%' border='1' align='center' bordercolor='#FF0000' bgcolor='#660000'>"; echo "<tr>"; echo "<td><div align='center'><strong><font size='7'>O cadastramento dos dados foi feito com sucesso! </font></strong> </div></td>"; echo "</tr>"; echo "</table>"; echo "<strong><font size='6'> </font></strong>"; echo "</body>"; echo "</html>"; } } } mysql_close($conexao);?></body></html>

Compartilhar este post


Link para o post
Compartilhar em outros sites

×

Informação importante

Ao usar o fórum, você concorda com nossos Termos e condições.