I have an admin portion of my website and would like to have the functionality of allowing admins to sign up and then be able to login. Right now I'm working on the Sign up form. When I submit my username and password, the web browser just shows a blank screen and nothing is added into my database. Here is my code. Any ideas why this is happening, and not working?
<?
$con = mysql_connect("localhost", "root", "");
if(!$con)
{
die('Could not connect: ' .mysql_error());
}
mysql_select_db("bics_place", $con);
$myusername=$_POST['myusername'];
$mypassword=$_POST['mypassword'];
$encrypted_mypassword=md5($mypassword);
$sql = "INSERT INTO admin
(username, password)
VALUES
('myusername','encrypted_mypassword')";
if(!mysql_query($sql, $con))
{
die('Error: ' .mysql_Error());
}
echo "1 record added";
mysql_close($con);
?>