Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

PHP config problems - can't output value of form field

Status
Not open for further replies.

Streetdaddy

Programmer
Jun 10, 1999
161
AU
I've done a default install of PHP under IIS on WinXP Pro just for my own dev purposes. It processes includes and can start and set session variables, but a few weird things so far happen:

If I set a session variable and then tell the session variable to ++ on each page refresh if its already set, the value increments to 1 and goes no further?

Also, if I submit a form with a field value e.g input field with name of Action and value of Login, when I try to output $Action it is empty?

Would this be to do with my config in php.ini? Miles

Those Micros~1 guys sure know what they doing!
 
The second problem is almost certainly a php.ini config issue. You probably don't have "register globals" set.

Before you reconfig PHP, you can try an alternate method of accesssing the field. Depending on whether your form is a "get" method or a "post" method, look in $_GET["Array"] or $_POST["Array"] to see if it's there.


To what value do you set the session variable when you first use it? Do you set it to zero, and know that it increments once and then quits, or do you initially set it to 1, and it never increments? Perfection in engineering does not happen when there is nothing more to add. Rather it happens when there is nothing more to take away.
 
i think register_globals is set but I'll have to check when I get home :) I didnt expect such a quick reply!

Ill also try checking those arrays out...

For the session variable, I set it too 0, and then it ++'s on the next refresh and is 1. Then after that if I refresh it doesn't increment. Miles

Those Micros~1 guys sure know what they doing!
 
Are you sure you're really refreshing? IE, for example, is bad about claiming that it really reran the CGI when it did not. Have you tried holding down CTRL or CTRL+Shift when you selected "refresh" from the view menu? Perfection in engineering does not happen when there is nothing more to add. Rather it happens when there is nothing more to take away.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top