Justtechjobs.com Find a programming school near you






Online Campus Both


php-general | 2003022

RE: [PHP] mysql trouble From: John W. Holmes (holmes072000 <email protected>)
Date: 02/25/03

> 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