RE: [PHP] mysql trouble

From: Date: Wed, 26 Feb 2003 01:07:32 +0000
Subject: RE: [PHP] mysql trouble
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-137167@lists.php.net to get a copy of this message
> 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/

« previous php.general (#137167) next »