Usamos cookies para medir audiência e melhorar sua experiência. Você pode aceitar ou recusar a qualquer momento. Veja sobre o iMasters.
boa tarde
Estou tentando que o Cadastro enviado com sucesso apareça depois que eu clicar no botão Cadastrar!!
Só que quando abro a pag cadastro_clente.php ele ja vem com essa msg
como proceder?
segue o cod
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="[http://www.w3.org/1999/xhtml">](http://www.w3.org/1999/xhtml)
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<style type="text/css"> background-color: #000000;
}
.style1 {
color: #FFFFFF;
font-size: 36px;
font-style: italic;
}</style></head>
<body>
<div align="center">
<div align="center"><span class="style1"><u>CADASTRO DE CLIENTES</u></span></div>
<br /><br />
<div align="center">
<table width="616" height="157" border="0">
<form method="post" action="cadastro_clente.php" >
<tr>
<td height="34"><div align="right"><span class="style6">CLIENTE:</span></div></td>
<td width="285"><label>
<div align="right">
<input type="text" name="cliente" id="banco1" size="40"/>
</label></td>
<tr>
<td height="36"><div align="right"><span class="style4"><span class="style7">USUÁRIO</span>:</span></div></td>
<td width="285"><label>
<div align="right">
<input type="text" name="usuario" id="banco2" size="40"/>
</label></td>
</tr>
<tr>
<td height="41"><div align="right"><span class="style6">SENHA:</span></div></td>
<td width="285"><label>
<div align="right">
<input type="text" name="senha" id="banco3" size="40"/>
</label></td>
</tr>
</table>
<p>
<input type="submit" name="cadastrar" value="Cadastrar" class="forminput" /><br /><br /><br /><br />
</p>
<p> </p>
</div>
<p> </p>
</body>
<?php
$bd_serv = "localhost";
$bd_user = "root";
$bd_pass = "";
$bd_base = "cls";
mysql_connect($bd_serv, $bd_user, $bd_pass)
or die("Erro na conexão com o servidor:".$bd_serv);
mysql_select_db($bd_base)
or die("Erro na seleção da base:<br>".$bd_base);
$cliente = $_POST['cliente'];
$usuario = $_POST['usuario'];
$senha = md5($_POST['senha']);
$sql= "INSERT INTO usuarios(cliente,usuario,senha) values ('$cliente','$usuario','$senha')";
$exe = mysql_query($sql) or die('Erro na inserção. Query enviada '.$sql.'<br/>Erro do Mysql - '.mysql_error());
echo "<div align='center'><font face='arial' size='5' color='fffff'>Dados enviado com sucesso!</font>";
?>
</html>
Agradeço desde ja
Carregando comentários...