Re: What's wrong with this code?

From: Date: Mon, 02 Sep 2002 04:52:21 +0000
Subject: Re: What's wrong with this code?
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-21512@lists.php.net to get a copy of this message
In article <3D72DDF8.6020203@peak.org>, s2sfarm@peak.org says... > Hi all, I'm running PHP4. What's wrong with this code: > > <? > > $db = mysql_connect("localhost", "Taj", "passwordhere"); > > mysql_select_db("s2s",$db); > > mysql_query("INSERT INTO prod VALUES ( 'Name', 'ShortDesc', > 'LongDesc', > 'PriceOZ', 'PriceLB', 'URLOZ', 'URLLB', > 'IMG') VALUES ('$_POST[Name]', > '$_POST[ShortDesc]', '$_POST[LongDesc], '$POST[PriceOZ', > '$_POST[PriceLB]', '$_POST[URLOZ]', '$_POST[URLLB], > '$_POST[IMG]');") > > ?> > > This will wrap, but, it should work. > > TIA, Taj Well, hard to say as we don't have your db to run it against. You might try using mysql_error() immediately after the mysql_query to get an error message from mysql that will help you, or help us help you. -- David Robley Temporary Kiwi! Quod subigo farinam

« previous php.db (#21512) next »