Jump to content

Form variables broken on desktop


fifthleg

Recommended Posts

I know this is dumb, but . . .

I've installed Apache, PHP, MySQL on my Windows XP desktop machine.

I can't get variables from forms to work in my PHP scripts. If I upload the same scripts to my website, they work fine. Everything else in PHP seems to be fine on my desktop, it just doesn't create variables from my (POST) forms. I'm guessing I need to change something in Apache or PHP configuration, but I don't know where to look.

Thanks for any help!

Link to comment
https://forums.phpfreaks.com/topic/97833-form-variables-broken-on-desktop/
Share on other sites

Even the simplest things like this don't give me anything:

 

<form method="post" action="<?php echo $PHP_SELF;?>">

First Name:<input type="text" name="Fname"><br />

<input type="submit" name="submit" id="submit" value="Submit" />

</form>

 

<?php

echo("$Fname");

?>

 

But if I skip the form and just say

$Fname = "Oliver";

it will echo correctly.

 

Your script requires register_globals to be enabled in order to function. Register_globals is now depreciated (and is to be removed completely when PHP6 is released) and has been disabled by default as it can cause security exploits within your code.

 

Now to get the value from the Fname field, you'll need to use $_POST['Fname'] also $PHP_SELF will need to be $_SERVER['PHP_SELF']

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.