RE: [PHP] Very stange problem

From: Date: Tue, 04 Jul 2000 14:13:23 +0000
Subject: RE: [PHP] Very stange problem
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-4746@lists.php.net to get a copy of this message
Hi there, Have you definitely got INSERT privileges as well as SELECT for that database? Paul Fotheringham. > -----Original Message----- > From: php-general-return-4744-P.Fotheringham=cmcsm.ac.uk@lists.php.net > [mailto:php-general-return-4744-P.Fotheringham=cmcsm.ac.uk@lists.php.net > ]On Behalf Of Daniel Vesma > Sent: Tuesday, July 04, 2000 2:59 PM > To: php-general@lists.php.net > Subject: [PHP] Very stange problem > > > 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 > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net >

« previous php.general (#4746) next »