Posted by Reggie on 06/29/07 21:46
Notice: Undefined variable: username in /home/fhlinux169/c/
clashoff.co.uk/user/htdocs/create_entry.php on line 11
Notice: Undefined variable: password in /home/fhlinux169/c/
clashoff.co.uk/user/htdocs/create_entry.php on line 11
I have a new error message which has occured please help.Am trying to
setup userlogin for my website.
This is my code:
<?php
mysql_connect("localhost","root") or
die ("Could not connect to database");
mysql_select_db("users") or
dir ("Could not select database");
if ($_POST['submit'] == "Register")
{
$query = "insert into users
(username, password) values ('$username', '$password')";
mysql_query($query) or
die (mysql_error());
?>
<h3>You are now registered</h3>
<a href="index.html">Go back to main page</a>
<?php
}
else
{
print("not registered");
}
?>
[Back to original message]
|