Menu
I am trying to send form info to a database.
[code=php]<body>
<?php
$host=”localhost”;
$user=”root”;
$pass=”password”;
mysql_connect($host,$user,$pass);
if($submit)
{
mysql_select_db(“movies”);
$result=MYSQL_QUERY(“INSEERT INTO new (name,email)” . “VALUES (‘$name’,’$email’)”);
print “$name was added”;
}
?>
</body>
form
[code=php]<form action=”sql.php” method=”post”>
<p><input name=”name” value=”name” type=”text”/></p>
<p><input name=”email” value=”email” type=”text”/></p>
<p><input name=”submit” value=”submit” type=”submit”/></p>
</form>
it comes up with the print message but nothing adds;