Hello

How I can fill a Database in MySQL with PHP whit the method POST???

I have a DB in MySQL and I have to fill with PHP, I don't know how I can, I
need a Script like this....


 <?
$servidor = "localhost" ;
$usuario = "pepe" ;
$contrasena = "*****" ;
$basededatos = "pepe_bd" ;
$conectar = mysql_connect($servidor,$usuario,$contrasena) ;
mysql_select_db($basededatos,$conectar) ;

if($enviar) {
mysql_query("insert into usuarios (usuario,contrasena,email) values
('$usuario','$contrasena','$email')") ;
echo "El usuario ha sido registrado." ;
}
?>
<form method="post" action="registrar.php">
<input type="text" name="usuario"><br>
<input type="password" name="contrasena"><br>
<input type="text" name="emai"><br><br>
<input type="submit" name="enviar" value="Registrar">
</form>


but this is not working I don't why?


Please if anyone have a Script that Do the same thing please send to me ok,
I only looking it and take the part of them that I need. ok.

Bye and thanks.....

Yusdaniel


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to