James, 

I used the extract($_POST); since I am using the post
method the something very strange happened. First, the
script is not displaying my data entry form and
second, it is inserting null values and the defaul
value into the database. 

I tried comenting extract($_POST); and the form came
back. I think that if I am able to view the form, it
will be possible to insert values into the database.
Do you have any solution for this? (it seems like
there's some light at the end of the tunnel!) 

Thanks

--
dk wema



--- James Keeline <[EMAIL PROTECTED]> wrote:

> --- "D. K. Wema" <[EMAIL PROTECTED]> wrote:
> 
> > I've tried to make the following script work but
> it
> > has totally failed. After many hours of
> frustration, I
> > kindly ask anyone who can help to save my day. The
> > script is supposed to insert data into the
> database
> > (mysql). When I enter the data and press the
> submit
> > button, the entered data disappears but nothing
> gets
> > to the database.
> 
> As already noted, your problem is that your script
> assumes that
> REGISTER_GLOBALS is turned on and most servers leave
> it off for security
> reasons.  Perhaps you are using an old tutorial. 
> REGISTER_GLOBALS takes form
> and cookie inputs and makes local variables when the
> script runs.  This
> convenience comes at a price of lower security.
> 
> Another factor which may be an issue is
> MAGIC_QUOTES_GPC which is usually on on
> most servers but is occasionally off.  This feature
> adds backslashes for some
> special characters, like quotation marks.
> 
> If your only problem is REGISTER_GLOBALS you can add
> this line at the top of
> your program to make a quick fix:
> 
>   extract($_POST);
> 
> That assumes your form is using the POST method
> which it is according to your
> code.  If you were using GET then it would be:
> 
>   extract($_GET);
> 
> If MAGIC_QUOTES_GPC is off, you may need to process
> each value in the $_POST
> array with addslashes() before you do the extract().
>  The extract() function
> will take each key-value pair in the $_POST
> associative array and make it into
> a local variable where the variable name is the
> array key and the value is the
> corresponding array value.
> 
> James D. Keeline



                
__________________________________ 
Yahoo! FareChase: Search multiple travel sites in one click.
http://farechase.yahoo.com


------------------------ Yahoo! Groups Sponsor --------------------~--> 
Fair play? Video games influencing politics. Click and talk back!
http://us.click.yahoo.com/u8TY5A/tzNLAA/yQLSAA/HKFolB/TM
--------------------------------------------------------------------~-> 

Community email addresses:
  Post message: php-list@yahoogroups.com
  Subscribe:    [EMAIL PROTECTED]
  Unsubscribe:  [EMAIL PROTECTED]
  List owner:   [EMAIL PROTECTED]

Shortcut URL to this page:
  http://groups.yahoo.com/group/php-list 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/php-list/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



Reply via email to