RE: [PHP] forms -- which pah?

From: Date: Fri, 20 Oct 2000 14:10:44 +0000
Subject: RE: [PHP] forms -- which pah?
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-21392@lists.php.net to get a copy of this message
Try leaving the form action set to scenario1.php. Then in the scenario1.php display what you want according to what Category B is set to... ie <? if (!$categoryb){ ?> Then do this... <? } else { ?> Do this... <? } ?> Of course you could add other if's in there also if you have several conditions. This is probably how I would handle it. ---------------------- Jack Davis Network Administrator Bootheel Internet webmaster@bootheel.net -----Original Message----- From: Real GM Webmaster [mailto:db7@realgm.com] Sent: Friday, October 20, 2000 9:29 AM To: php-general@lists.php.net Subject: [PHP] forms -- which pah? hi guys and gals, I have a problem with my form which has left me scratching my head. Up the top of my form I have my <FORM ACTION="scenario1.php" METHOD=GET>, but the problem is that the conditions that are/are not met during the execution of the form depends on which file will be fetched. For example, just say I have two different categories through my form, category A and category B. If Category B is > 0 (this value can only be derived through the execution of the form) then scenario2.php is the page I want to proceed, but if category B = 0 then scenario1.php should execute. If I have an if statement up the top of the page it does not take into account the values assigned to category B because the check has been made before the form has been executed. If I put this before my submit button at the end of the form, once everything is executed, then I lose all my details from above this if statement. Has anyone got any idea on how I can do this? Thanks In Advance. Michael Webmaster, Real General Manager Inc. http://www.realgm.com

« previous php.general (#21392) next »