Re: Page load based on logic
| From: | Justin Patrin | Date: | Fri, 30 Jul 2004 21:52:20 +0000 |
| Subject: | Re: Page load based on logic | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-192365@lists.php.net to get a copy of this message | ||
On Fri, 30 Jul 2004 17:12:01 -0400, Michael Harding
<mharding@genesisgroupusa.com> wrote:
> I have a if statement.
>
> if (this){
> load page1.php;
> } else {
> load page2.php;
> }
>
> I simply want to go to different page depending on the results of a logic
> statement. I can't find a function or statement that allow me to pass the
> page to. I am looking for a "load()" or goto() type call.
>
> I do NOT want to do the "header" thing and reload the same page back onto
> itself.
>
> I can't believe a language as powerful as PHP does have this basic function.
> I must be missing it.
>
> Any suggestions?
>
if($cond == true) {
include('page1.php');
} else {
include('page2.php');
}
--
DB_DataObject_FormBuilder - The database at your fingertips
http://pear.php.net/package/DB_DataObject_FormBuilder
paperCrane --Justin Patrin--