Query Not Working
- by John
Hello,
The simple query below is not working. Any idea why? When I echo the three variables, the correct values are returned, so I know I have variables.
Thanks in advance,
John
$comment = $_POST['comment'];
$uid = $_POST['uid'];
$subid = $_POST['submissionid'];
echo $comment;
echo $uid;
echo $subid;
mysql_connect("mysqlv12", "username", "password") or die(mysql_error());
mysql_select_db("database") or die(mysql_error());
$query = sprintf("INSERT INTO comment VALUES (NULL, '%s', '%s', '%s', NULL, NULL)", $uid, $subid, $comment);
mysql_query($query);