• Introducing WebPros Cloud - a fully managed infrastructure platform purpose-built to simplify the deployment of WebPros products !  WebPros Cloud enables you to easily deliver WebPros solutions — without the complexity of managing the infrastructure.
    Join the pilot program today!
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.

A simple PHP script won't work

D

David Joor

Guest
I just got a plesk server and now I am having a hell of a time getting variables posted back to the php page once submitted. I can't get the script to read the variable after it has been submitted. Basically the text doesn't get printed to screen. I have no problem with this on ensim, this is so basic that I am lost. Running 4.3.10 php and httpd-2.0.46-44.ent

Code:
<?PHP
if ($btnSubmit != "") {
     echo "You have pressed the submit button";
}
?>

<form method="POST" action="<? print $_SERVER['SCRIPT_NAME'];?>">
<input type="submit" name="btnSubmit" value="push me"> 
</form>
 
Someone helped me at ev1servers forum. The problem was in my php.ini file.

Need to set it to this.
Code:
register_globals = On

it was off.
 
I'd leave the "register_globals = Off"

and would change the "if" statement to:

. . .
if ($_POST["btnSubmit"] != "") {
. . .


It's much more secure.
 
Back
Top