In article <[EMAIL PROTECTED]>, 
[EMAIL PROTECTED] says...
> 
> 
> Hi all, 
>  I am trying to do a simple INSERT data into the database using the following 
> php script but the problem here is that whenever I click "submit", the script 
> only insert a "NULL" value into the columns into the datadase instead the 
> value I enter in the forms field....SELECT query was successful but not 
> INSERT..
> 
> A snip of the code are as follow:
> 
> <?php
> //declare error variable
> $err = "";
> 
> //set error variable
> $err .= check_tutor_name();
> $err .= check_tutor_contact();
> $err .= check_tutor_email();
> $err .= check_tutor_profile();
> 
> //define connection string
> $dsn = "mysql://root:[EMAIL PROTECTED]/table1";
> 
> //connect to DB
> $db = DB::connect ($dsn);
> //check for any DB connection errors
>    if (DB::isError ($db))
>        die ($db->getMessage());
> 
> $tutor_name = $db->quote($POST["tutor_name"]);
> $tutor_contact = $db->quote($POST["tutor_contact"]);
> $tutor_email = $db->quote($POST["tutor_email"]);
> $tutor_profile = $db->quote($POST["tutor_profile"]);

I think your problem might be in the above lines; the superglobal variable 
is $_POST{'whatever'} - note the underscore in the name.
<SNIP code>> 
> 
> So, what could be the problem with the code I have wriiten???
> Any help are appreciated.
> 
> 
> Irin.
> 

Cheers
-- 
Quod subigo farinam

A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing on usenet?

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

Reply via email to