Jump to content


Photo

Forms not working anymore


  • Please log in to reply
2 replies to this topic

#1 arman

arman
  • New Members
  • Pip
  • Newbie
  • 2 posts
  • LocationThe Netherlands

Posted 27 July 2006 - 10:09 AM

Hi,

Suddenly, all forms on a web site do not work anymore. Perhaps some setting on this server has changed or the problem is caused by the update to PHP v5.1.4.
Environment: Linux / Apache.

This is what goes wrong: internal variables, declared in a php form, do not exist anymore as soon as the form calls itself.
The forms worked OK for years and still work on other systems.

Any help is appreciated.

Arman
Arman

#2 wildteen88

wildteen88
  • Staff Alumni
  • Advanced Member
  • 10,482 posts
  • LocationUK, Bournemouth

Posted 27 July 2006 - 10:28 AM

By any chance are you using variables like $PHP_SELF, $DOCUMENT_ROOT etc? I thinks its becuase a setting called register_globals has been turned off. You'll have to use the superglobal arrays in order access your form variables/server variables, such as $_POST, for POST'd data, $_GET for variables in the URL, $_SERVER for server variables, $_SESSION for session vars, $_COOKIE for cookie vars etc.

So if you are using the server variable $PHP_SELF you'll need to use $_SERVER['PHP_SELF'] in order use that variable.

#3 arman

arman
  • New Members
  • Pip
  • Newbie
  • 2 posts
  • LocationThe Netherlands

Posted 27 July 2006 - 06:07 PM

Indeed, the register_globals was set off. Thanks for your help.
Arman




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users