RE: [PHP] TO Bryan LipscyRe: [PHP] i got a problem
| From: | Bryan Lipscy | Date: | Wed, 05 Mar 2003 17:17:52 +0000 |
| Subject: | RE: [PHP] TO Bryan LipscyRe: [PHP] i got a problem | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-138316@lists.php.net to get a copy of this message | ||
That is what I thought it would do. A couple of suggestions:
$sql = "INSERT INTO agenda (nombre, direccion, telefono, email, pais,
comentario) VALUES ('.$_POST['$nombre'].',
'.$_POST['$direccion'].',
'.$_POST['$telefono'].', '.$_POST['$email'].',
'.$_POST['$pais'].',
'.$_POST['$comentario'].')";
OR
$nombre = $_POST['$nombre'];
$direccion = $_POST['$direccion'];
$telefono = $_POST['$telefono'];
$email = $_POST['$email'];
$pais = $_POST['$pais'];
$comentario = $_POST['$comentario'];
$sql = "INSERT INTO agenda (nombre, direccion, telefono, email, pais,
comentario) VALUES ('$nombre', '$direccion', '$telefono',
'$email',
'$pais', '$comentario')";
There is no need for the \n in the SQL call.
-----Original Message-----
From: Luis A [mailto:webmaster@iscf.esisc.colombus.cu]
Sent: Tuesday, March 04, 2003 8:49 PM
To: php-general@lists.php.net
Subject: [PHP] TO Bryan LipscyRe: [PHP] i got a problem
HE show me this
INSERT INTO agenda (nombre, direccion, telefono, email, pais,
comentario) VALUES
('','','','','','')¡THANKS! WE HAVE
RECEIVED YOUR
DATA.
i think he does not asimilate the $ on the variable VALUES (' $DATA,' )
----- Original Message -----
From: "Bryan Lipscy" <x427279616e@monroe.net>
To: "'Luis A'" <webmaster@iscf.esisc.colombus.cu>;
<php-general@lists.php.net>
Sent: Wednesday, March 05, 2003 12:27 PM
Subject: RE: [PHP] i got a problem
> Try
>
> echo $sql;
>
> To check your sql before execution.
>
>
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php