wisemaar Posted April 27, 2007 Share Posted April 27, 2007 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 More sharing options...
kenrbnsn Posted April 27, 2007 Share Posted April 27, 2007 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 Link to comment https://forums.phpfreaks.com/topic/48977-problem-obtaining-data-from-forms/#findComment-239967 Share on other sites More sharing options...
wisemaar Posted April 27, 2007 Author Share Posted April 27, 2007 Thanks for that.... Never noticed that the new server is running version 5.... Link to comment https://forums.phpfreaks.com/topic/48977-problem-obtaining-data-from-forms/#findComment-239975 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.