Re: newbie question:

From: Date: Wed, 31 May 2000 18:38:50 +0000
Subject: Re: newbie question:
References: 1 2  Groups: php.db 
Request: Send a blank email to php-db+get-145@lists.php.net to get a copy of this message
It's probably your insert statement, and the lack of quotes around the strings. Like so: Fail: mysql_query("INSERT INTO $table VALUES (1, $str1, $str2)"); Pass: mysql_query("INSERT INTO $table VALUES (1, '$str1', '$str2')"); See if that doesn't take care of the problem... -r3- ----- Original Message ----- From: Kenn Murrah <warden@bakergrfx.com> To: <php-db@lists.php.net> Sent: Wednesday, May 31, 2000 2:36 PM Subject: [PHP-DB] newbie question: > I'm trying to accomplish a simple task, that of > inputting text and numbers from an HTML form, > then writing to mySQL via PHP. > > Oddly enough, when I attempt this with numerals, > all is well. When I attempt it with a text string, it > fails. > > Pardon the beginner question, but can anyone tell > me what I'm likely doing wrong? > > Thanks in advance, > > Kenn > > > > -- > PHP Database Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-db-unsubscribe@lists.php.net > For additional commands, e-mail: php-db-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net

« previous php.db (#145) next »