Re: [PHP] Page load based on logic
On Sat, 31 Jul 2004 01:58:48 -0400, Michael Harding <[EMAIL PROTECTED]> wrote: > Thank you. > > You suggestion will work for some cases. However it doesn't actually load a > different page. Sometime I will need to load a completely new URL instead > of just a local PHP page...ie: www.somepage.com. > If you want the user to actually see a different URL, then you *must* redirect them using a Location header or a meta refresh or javascript. If all you want is to display the content from another page within your script (but why you'd want to do this I don't knowall of its internal links would probably be broken), you should be able to do: readfile('http://example.com'); -- DB_DataObject_FormBuilder - The database at your fingertips http://pear.php.net/package/DB_DataObject_FormBuilder paperCrane --Justin Patrin-- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Page load based on logic
Huh? I don't understand. Sorry... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Page load based on logic
On Saturday 31 July 2004 13:58, Michael Harding wrote: > You suggestion will work for some cases. However it doesn't actually load > a different page. Sometime I will need to load a completely new URL > instead of just a local PHP page...ie: www.somepage.com. What exactly is it that you want to do? 1) redirect the use to a different -- the URL will change or 2) output something different -- the URL will not change -- Jason Wong -> Gremlins Associates -> www.gremlins.biz Open Source Software Systems Integrators * Web Design & Hosting * Internet & Intranet Applications Development * -- Search the list archives before you post http://marc.theaimsgroup.com/?l=php-general -- /* You know, the difference between this company and the Titanic is that the Titanic had paying customers. */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Page load based on logic
Thank you. You suggestion will work for some cases. However it doesn't actually load a different page. Sometime I will need to load a completely new URL instead of just a local PHP page...ie: www.somepage.com. Thanks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Page load based on logic
On Fri, 30 Jul 2004 17:12:01 -0400, Michael Harding <[EMAIL PROTECTED]> 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-- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Page load based on logic
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? Thanks. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php