On Tuesday 09 December 2003 15:34, [EMAIL PROTECTED] wrote:
> Well, I tried that and this is what i got:
>
> INSERT INTO tutor (tutor_name, tutor_contact, tutor_email, tutor_profile)
> VALUES (''irin'', ''788798878'', ''[EMAIL PROTECTED]'', ''no profile'')
> DB Error: syntax error
>
> well, when I echo again, i can successfully see the values I entered. But
> this time there's a  "DB syntax error"????

That's most likely because:

  $db->quote($_POST["tutor_contact"]

actually adds the single quotes around the original value of 
$_POST["tutor_contact"]. Thus your sql construction statement should omit the 
the single quotes:

$sql = "INSERT INTO tutor (tutor_name,
 tutor_contact,tutor_email,tutor_profile)
         VALUES
        ($tutor_name, $tutor_contact, $tutor_email,
 $tutor_profile)";

> and when I went into the database to view, it stil reflect a "NULL"
> value...

Because the above query failed the record still contains its old value.

-- 
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
------------------------------------------
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
------------------------------------------
/*
Interchangeable parts don't, leak proof seals will and self starters wont
                -- Murphy's Bush Fire Brigade Laws n20
*/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to