Re: Script FLOW-- branching and subroutines/functions
| From: | Chris Worth | Date: | Mon, 09 Apr 2001 15:21:39 +0000 |
| Subject: | Re: Script FLOW-- branching and subroutines/functions | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-47808@lists.php.net to get a copy of this message | ||
Thanks, Michael
You've reinforced how I've come learn that php does things. When I first tried the script
it simply printed the first form over and over. it was kind of funny in a way. I'll
restructure
my program now to account for how PHP does things. thanks again,
chris
On Mon, 9 Apr 2001 22:34:36 +0930 (CST), Michael Hall wrote:
>
>Here's what I'd do (pseudocode):
>
><?php
>
>if ($submit) {
> check for duplicate;
> if (everything OK) {
> commit to db;
> }
>}
>else {
> display form with submit button named 'submit';
>}
>
>?>
>
>Mick
>
>> how do I do this
>>
>> call form
>> wait there until it is completed
>> call check
>> look for duplicate
>>
>> then if ok
>> I then commit to database after entereing data
>
>
>