I have the following PHP code/file on my website but for some ungodly reason it will not insert the records typed in by the user into the mySQL database table as it is required to. Can anyone tell me why this is?
So far as I can tell the code is completely correct I don't know why this is happening...
Please help...Code is below...
<html>
<head>
</head>
<body>
<form action="register_development_file_1.php" method="post">
Email: <input type="text" name="email"><br />
Date: <input type="text" name="date"><br />
Time: <input type="text" name="time"><br />
<input type="submit" name="submit">
</form>
<?php
if (isset($_POST['submit']))
{
$con = mysql_connect("localhost","username","password");
if (!$con)
{
die("Could not connect to the database: " . mysql_error());
}
mysql_select_db("wwwbrecs_BREC",$con);
$sql = "INSERT INTO 'signups' ('signup_email_address', 'signup_date', 'signup_time') VALUES ('$_POST[email]','$_POST[date]','$_POST[time]')";
mysql_query($sql,$con);
mysql_close($con);
}
?>
</body>
</html>