php mysql insert
Posted: Sun Oct 09, 2005 4:58 pm
ive made this script and it just dont know why it doesnt work.. it should.
any ideas at all? thanks
ps. it might be because $commenttext has spaces in it
Code: Select all
<?
$commenttextposter == "test";
$commenttext == "test script 23";
mysql_connect("localhost","root","password");
mysql_select_db("dave");
mysql_query("INSERT INTO comments (commenttextposter, commenttext) VALUES ('$commenttextposter', '$commenttext')");
mysql_close();
echo "Comment added";
?>any ideas at all? thanks
ps. it might be because $commenttext has spaces in it