Page 1 of 1

if statment between 2 pages

Posted: Thu Dec 22, 2011 8:46 am
by nite4000
i know this is going to be hard to understand but please be patient with me.

I have this if statement I will give example

Code: Select all


<?php if($settings['field']=='TRUE') { ?>

SHOW THIS
<?php 
} else { ?>
SHOW THIS
<?php } ?>


Now that is on page1.php

what i need to do is make a new page and put that on a page by itself

so on page1.php i would do a include pgwiif.php

but that closeing bracket of the if needs to be on page1.php while the rest is on the other page how can i do this without getting an error


hope this makes since.

Thanks

Re: if statment between 2 pages

Posted: Thu Dec 22, 2011 8:56 am
by Eric!
PHP code can't execute across multiple page requests as one script. Why don't you tell us why you need to do this on two pages? Perhaps there is an easier way to do what you want.

Re: if statment between 2 pages

Posted: Thu Dec 22, 2011 8:58 am
by nite4000
well this is code that has to be on all pages and i was trying to make it easier on myself without haveing to type so much code