Jump to content

Problem obtaining data from forms....


wisemaar

Recommended Posts

I am not too sure if anyone will be able to help with this or not, but here goes!!

I have loaded some pages onto a new server.

There are numerous pages that collect data from the user on a html form and then passes the input to the next page, which updates a database table with this information.

This worked fine when hosted on my previous server, but does not now work! Basically the problem is that it is not getting the information passed from the form...

I am using the following command to retrieve each of the passed variables and then using the variables to display on the page and update the database...

 

while (list($key, $value)=each($HTTP_GET_VARS))

{

$key==$value;

}

 

I can however retrieve the variables by assigning each variable individually, but as some of the forms pass round 60 different ones, I don't want to type them all out one by one!

 

Any ideas or help appreciated.

 

Link to comment
https://forums.phpfreaks.com/topic/48977-problem-obtaining-data-from-forms/
Share on other sites

The variable "$HTTP_GET_VARS" is being phased out and isn't even enabled in PHP5 unless explicitly turned on in the php.ini file. Use the $_GET array instead.

 

You also do:

<?php
foreach ($_GET as $key => $val)
  $$key = $val;
?>

or

<?php
extract($_GET);
?>

 

Ken

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.