NYCPHP Meetup

NYPHP.org

[nycphp-talk] automatic redirection of PHP script

Nasir Zubair nasir81 at gmail.com
Tue Oct 23 05:52:57 EDT 2007


The simplest way I can think of is:

if($Cost < 100)
{
   include('script-a.php');
   exit();
}
else if($Cost > 1000)
{
   include('script-b.php');
   exit();
}
// if the above two "exit's" didn't get invoked, rest of the script will be
processed.
.
.
.
.



On 10/23/07, PaulCheung <paulcheung at tiscali.co.uk> wrote:
>
> Hi
>
> I was wondering if anybody knows? I am sure that others must have
> encountered this in the past. What I am trying to accomplish is a
> conditional exit from the current script,  go to and execute another
> script
> without any manual intervention. Using the following pseudo code, I am
> fully
> aware it is not elegant but it serves to explain what I want to
> accomplish.
>
> If $Cost  <  100 goto and execute script-a.php
>     else
>           if $Cost  >  1000 goto and execute script-b.php
>              else
>                    carry on;
>
> Normally I would be happy to supply real PHP coding but unfortunately I do
> not know how to execute what I want to.
>
> Paul
> _______________________________________________
> New York PHP Community Talk Mailing List
> http://lists.nyphp.org/mailman/listinfo/talk
>
> NYPHPCon 2006 Presentations Online
> http://www.nyphpcon.com
>
> Show Your Participation in New York PHP
> http://www.nyphp.org/show_participation.php
>



-- 
Nasir Zubair
http://www.nasir.us/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.nyphp.org/pipermail/talk/attachments/20071023/80a3e65e/attachment.html>


More information about the talk mailing list