order of output to a screen
Posted: Tue Nov 30, 2004 2:13 pm
11302004 1407 GMT-6
I have this long script. Inside a for loop Im checking to see if any of the form fields are empty. If they are then I want post the information back to the screen so they can fill in the missing information. If none of the fields is missing any information, I want to change a lot of other things on the page.
What Im struggling with is, if i have a for loop and its inside.... let me show you..
Ok. I have this for loop inside a $form_display = ' '; ... but, if I have to check the information inside the for loop before posting info to the screen. My question then is, can I change something farther up on the page?
IS php intrepreted line by line or as a whole document?
Wade
I have this long script. Inside a for loop Im checking to see if any of the form fields are empty. If they are then I want post the information back to the screen so they can fill in the missing information. If none of the fields is missing any information, I want to change a lot of other things on the page.
What Im struggling with is, if i have a for loop and its inside.... let me show you..
Code: Select all
<?php
for(....) {
if( x is missing)
repost form field to screen
else
just post information to screen
}
if ($empty = 0) {
change H1 and H3
change page title
Add these extra items to the page
add extra buttons to the form
}
else
{ normal h1 and h3
normal page title
normal form buttons
}
?>IS php intrepreted line by line or as a whole document?
Wade