to holmes Re: [PHP] mysql trouble

From: Date: Wed, 26 Feb 2003 14:05:30 +0000
Subject: to holmes Re: [PHP] mysql trouble
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-137228@lists.php.net to get a copy of this message
how is that ?????? ----- Original Message ----- From: "John W. Holmes" <holmes072000@charter.net> To: "'Luis A'" <webmaster@iscf.esisc.colombus.cu>; <php-general@lists.php.net> Sent: Tuesday, February 25, 2003 8:07 PM Subject: RE: [PHP] mysql trouble > > take a look at this > > <?php > > // process form > > $link = mysql_connect("localhost", "root"); > > mysql_select_db("mydb",$db); > > $sql = "INSERT INTO agenda (nombre, direccion, telefono, email) " + > > "VALUES ('$nombre', '$direccion', '$telefono', > > '$email')"; > > $result = mysql_query($sql); > > You use a period (.) to concatenate strings, not a plus (+) symbol. > > If you displayed $sql, like you should when you're debugging your > script, you'd of realized this a long time ago. > > ---John W. Holmes... > > PHP Architect - A monthly magazine for PHP Professionals. Get your copy > today. http://www.phparch.com/ > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > >

« previous php.general (#137228) next »