newbie question
| From: | Ted Knudson | Date: | Wed, 24 May 2000 01:16:01 +0000 |
| Subject: | newbie question | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-403@lists.php.net to get a copy of this message | ||
Another way to do it is to use only one form.
If(submit = something){include(something.php3);}
If(submit = somethingelse){include(somethingelse.php3);}
<form action="test.php" method=POST>
<--Code-->
If(submit = somethingmore){include(somethingmore.php3);}
<--If() can be inside or out side the form.-->
<input type=submit value = something>
If(!submit){<input type=submit value = something>}
If(submit = something){<input type=submit value = somethingelse>}
If(submit = somethingelse){<input type=submit value = somethingmore>}
If(submit = somethingmore){<input type=submit value = GoSomePlace>}
There are a lot of advatages to using this method of writing dynamic pages.
It is compact and easy to read later.
Ted Knudson
http://www.automatedcabinets.com
http://www.pulsarusa.com
> -----Original Message-----
> From: Kenn Murrah [mailto:warden@bakergrfx.com]
> Sent: Tuesday, May 23, 2000 10:28 AM
> To: php-general@lists.php.net
> Subject: newbie question
>
>
> Pardon the elementary nature of this question, but here'
> what I'm trying to do:
>
> I want to use a form to look up customer number and add
> a job number, then in the next script to retain the customer
> number and job number so that they do not have to be
> re-typed on the subsequent script -- sort of cascading of
> variables....
>
> In a highly simplified form, here's what I tried and failed with --
> can anyone tell me how to get the $customer_code and
> $job_number transferred to the final script, test3.php ???
>
> Thanks in advance,
>
> Kenn Murrah
>
>
> TEST1.PHP
> <html>
> <head>
> <title>
> Job Entry</title></head>
>
> <body>CSR Order Entry Test<p>
>
> <html> <body> <form action="test2.php" method=GET>
>
> Job Number: <input type=text name=job_number size = 6 maxlength=6><p>
>
> Customer Code: <input type=text name=customer_code size=4 maxlength=4> <p>
> <input type=submit> </form> </body> </html>
>
>
>
> TEST2.PHP
> <html>
> <head>
> <title>
> Job Entry2</title></head>
>
> <body>CSR Order Entry Test<p>
>
> <body> <form action="test3.php" method=GET>
> <?php print $job_number print $customer_code ?>
> <input type=submit> </form> </body> </html>
>
>
>
>
> TEST3.PHP
> <html>
> <head>
> <title>
> Job Entry3
> </title></head>
>
> <body>CSR Order Entry Test<p>
>
> <body>
> <?php print $job_number $customer_code ?>
> </form> </body> </html>
>
>
>