For some reason my INSERT statement isn't working.
Posted: Sat Jul 12, 2003 2:53 pm
Hi,
I just got my member's area working this morning and now I'm trying to get this form to add the info to my database, it should work fine because I just copied the text from another script and changed the variables. I probaly just have a typo in it but could someone please just give it a look over?
I just got my member's area working this morning and now I'm trying to get this form to add the info to my database, it should work fine because I just copied the text from another script and changed the variables. I probaly just have a typo in it but could someone please just give it a look over?
Code: Select all
<?PHP
$date = gmdate("l j")."<sup>".date("S")."</sup>".date(" F, Y");
$connection = mysql_connect("localhost", "[i]username[/i]", "[i]password[/i]");
$db = mysql_select_db("$database", $connection);
$query = "INSERT INTO reports (uname,block.hours,blocksweep,bds,currentevents,ressies,contacts,queries,date)".
"VALUES ('$username', '$block', '$hours', '$sweep', '$bds', '$blockdoing', '$events', '$ressies', '$contacts', '$quieries')";
$result = mysql_query($query, $connection);
echo "Report Successfully Submitted";
?>