Hello everyone, I have a question about a very basic form I've set up. I'm trying to get the hang of SQL select, but I first need to put some content in my SQL tables! For now, here is the code I've used:
The form on the page:
<form action="testform.php" method="post">
<input type="text" name="title" value="Game Title">
<input type="text" name="esrb" value="ESRB Rating">
<input type="Submit" value="Submit Title">
The testform.php file:
@mysql_select_db($database) or die( "Unable to select database");
$query="INSERT INTO game_titles (gameID,gametitle,esrbrating) VALUES(DEFAULT,$title,$esrb)";
echo "It worked."
For some reason, the output isn't written into the correct tables? What's wrong here? Thanks!