PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
<?php
if ($submitrecord == "SUBMIT") {
if ($league == "cal") {
$sql = "INSERT INTO 'records_cal', 'records_total' SET opponents='$opponent', date='$date', map='$map', league='$league', outcome='$outcome'" ;
}
// Confirming data has been entered or not
if (@mysql_query($sql)) {
echo("<div align="center">Your Record has been added.</div>");
} else {
echo ("<div align="center">Error adding submitted record: " . mysql_error() . "</div>");
}
}
?>
I come on and try it, and i start getting this error:
Error adding submitted record: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near ''records_cal' SET opponents='Test', date='2004-01-01', map='de_
phenom, don't ask the moderators of this forum to delete this post, it might help other people someday that had the same problem...
or is it that you don't want to look back in the future and see a question like this one being one of yours? it's ok, maybe you'll look back at this post to fix your code again if u have the same problem another time...