Jump to content

not receiving form values when submit it


delickate

Recommended Posts

hi,

I've a site named sgi-int.com

it was running fine. i just switch the server. site is working fine but forms has stop working.

each form is being submit but i can't receive a value.

probably $HTTP_GET_VARS is not working there, in doubt i change it to $_REQUEST and print it as print_r($_ERQUEST). It receive only session.

Then i tried to chagne method from "POST" to "GET", it start getting values. but some other issue arrise,

I need to know that what could be the actual prob. how can i resolve this issue.

you can see its work at sgi-int.com by creating an account.

Please suggest solution as soon as possible if any

Many thanks

Link to comment
Share on other sites

Your old server most likely relies on register_globals setting which has been depricated for nearly ten years. Try running the function phpinfo(); and checking.

 

An example of your code contains:

<form name="quick_find" action="http://sgi-int.com/advanced_search_result.php" method="get"> 

 

So naturally you can access it through this on the appropriate page:

$term = $_GET['quick_find'];

 

If there is anything specific you need help on, I'm sure it'll be better for you and us if you can pinpoint the exact problems.

Link to comment
Share on other sites

Hi,

Thanks for response.

well, i've told that when do i change the method from post to get then it recieve form value and you can see in url, a long url makes. so i need to use method post, as it is now, but unable to receive form values, i've set register globel on but in vain,

 

do you get my point?

Link to comment
Share on other sites

change form to method = "get"

Change

foreach($_POST as $name => $value)
   {
       echo "$name = $value<br />\n";

   }

to

foreach($_GET as $name => $value)
   {
       echo "$name = $value<br />\n";

   }

If that displays the values the problem could well be with your host not posting correctly

Link to comment
Share on other sites

well,

Thanks for great help.

i already told you that if i change method from post to get then it receive all the values. i've thousand of forms in my website, it is difficult to change all $HTTP_GET_VARS to $_REQUEST or $_GET,

is there problem of register global?

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.