Script FLOW-- branching and subroutines/functions

From: Date: Mon, 09 Apr 2001 14:27:59 +0000
Subject: Script FLOW-- branching and subroutines/functions
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-47788@lists.php.net to get a copy of this message
Hello all. I'm relatively new to the world of PHP, but I've programmed in C, C++, Rexx, in the past. What I'm working on is this and I wanted to clarify some things about how PHP "runs" I've got a function that contains a form and depending on the entry to the form, which is then checked against a database(to avoid duplicates in the list). once a non duplicate is determined it advances to the next form for data entry. I had the whole thing in a while loop but that was a disaster. I pass $PHP_SELF to the functions, am I to understand that once the script returns from the function it starts executing at the beginning? While( Not stopping) { do first form() check against database() if(above check is OK) do the information form() if(form entered) put data into database() } as it is structured above it just runs and runs through the first form. I put a break into the while loop, but the script still seems to run right to the end. I suppose to phrase another way. 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 PHP doesn't seem to stop execution and wait for user input. it seems to merrily plug away. thanks for any input gang, Chris

« previous php.general (#47788) next »