Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > HELP! If (!$submit) not working in php!

HELP! If (!$submit) not working in php!
Thread Tools
Fresh-Faced Recruit
Join Date: May 2001
Location: Chicago, IL
Status: Offline
Reply With Quote
Oct 18, 2002, 11:05 AM
 
Hey there gang :-)

I need some help. I installed version 4.2.2 of php yesterday using Mark Liyanage's instructions in order to get gd working (so I can test a little online program I'm making for my office) and everything seemed to be going well. My phpinfo script worked well, my test pages worked. However, this morning, I tried a script that worked before the install yesterday and it now does not work. It was a page with a form that posted to to the same page using if (!$submit) ... etc. Now, instead of giving me my results upon hitting submit, the page essentially reloads as if nothing happened. I've even copied and pasted example scripts online with this structure and got the same result. Any ideas on what I can do?

Thanks in advance for your help!!!

Tim Kennett

Pismo Powerbook
10.1.5
PHP 4.2.2
Apache 1.3.26
--Life is short. Find meaning and live boldly.--
     
Mac Enthusiast
Join Date: Apr 2000
Location: Belgium
Status: Offline
Reply With Quote
Oct 19, 2002, 02:58 AM
 
Try putting the following in your httpd.conf file:
Code:
<IfModule mod_php4.c> php_flag register_globals on </IfModule>
This on by default in earlier versions of PHP, but is off by default in PHP 4.2.0 and later. With this flag turned on PHP will register the HTTP POST/GET parameters as globals. The other possibility is to use the $_COOKIE, $_GET, $_POST arrays (so a parameter 'submit' sent with a HTTP POST would be accessible through $_POST['submit']). They disabled it by default for increased security.
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 06:14 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2