Very stange problem
| From: | Daniel Vesma | Date: | Tue, 04 Jul 2000 13:59:21 +0000 |
| Subject: | Very stange problem | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-4744@lists.php.net to get a copy of this message | ||
Guys,
OK, I failed in my quest not to bother you again today, but this one has me
flummoxed...
I have the following code...
<?php
$db = mysql_connect("localhost", "root");
mysql_select_db("gr2",$db);
$result = mysql_query("INSERT INTO tblGrads VALUES (NULL,
'$name','$email','$web','$phone','$dob','$address','$schooling','$experience
','$interests')",$db);
if($result)
{
print "<P>Worked";
}
else
{
print "<P>Did not work";
}
?>
It prints "Did not work" to the screen. If I substitute the "$result =..."
line for...
$result = mysql_query("SELECT * FROM tblGrads",$db);
... it prints "Worked". Why will it read, but not write????? It was working
yesterday, and I'm stumped.
Thanks for your time.
Daniel Vesma - IT and Webdesign Manager
The Web Tree: http://www.thewebtree.com