On Thursday 12 December 2002 04:30, Pushpinder Singh Garcha wrote:
> Hello,
>
> I am using PHP to create forms and then am entering the user input into
> a MySQL DB
> In the first query I am trying to select the values that the user
> entered on the form
>
> THIS DOES NOT WERK.... gives error unable to execute query
> $sql = "INSERT INTO `guest` (`title`, `first_name`, `last_name`,
> `login`, `password`, `passport_number`, `e_mail`, `question`, `answer`,
> `industry`, `job_title`, `state`, `city`, `company`, `last_visit`)
> VALUES ('\$select\', \'$f_name\', \'$l_name\', \'$login\',
> \'$password\', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
> NOW());";
Not sure why you're escaping the single quote. It's unnecessary -- and I
suspect you mis-escaped $select as well. Any you can use this format, which
IMHO, is a lot easier on the eyes:
$sql = "INSERT INTO `guest`
SET `title` = '$title',
`first_name` = '$first_name',
...,
...,
`last_visit` = NOW()";
--
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
/*
I had a lease on an OEDIPUS COMPLEX back in '81 ...
*/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php