This is a discussion on RE: function help simple redirect within the PHP General forums, part of the PHP Programming Forums category; Sorry I'm getting this error message Parse error: parse error, unexpected T_ELSEIF __________________________________ Do you Yahoo!? Exclusive Video Premiere - ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
Sorry I'm getting this error message
Parse error: parse error, unexpected T_ELSEIF __________________________________ Do you Yahoo!? Exclusive Video Premiere - Britney Spears http://launch.yahoo.com/promos/britneyspears/ |
|
|||
|
$payment = "1";
function payment(){ global $payment; if ($payment == "0"){ header ("Location: test_page.html"); } elseif ($payment == "1") { header ("Location: test_page2.html"); } } -- // DvDmanDT MSN: dvdmandt€hotmail.com Mail: dvdmandt€telia.com ########################## Please, if you are using windows, you may be infected by Swen. Please go here to find out more: http://us.mcafee.com/virusInfo/defau...er&hcName=swen http://securityresponse.symantec.com...swen.a@mm.html ########################## "Frank Tudor" <frank_tudor@yahoo.com> skrev i meddelandet news:20031027190625.41234.qmail@web11604.mail.yaho o.com... > Sorry I'm getting this error message > > Parse error: parse error, unexpected T_ELSEIF > > __________________________________ > Do you Yahoo!? > Exclusive Video Premiere - Britney Spears > http://launch.yahoo.com/promos/britneyspears/ |
|
|||
|
This one worked (kinda)!!!!
I have no more errors but it doesn't do the redirect (hmmm)?? So now here is what it looks like: I am putting in the $payment="1"; so it will automatically go to test_page2.html but it just sits there. Is there a headers thing already going on blocking this? I know don't need the quotes around the "1" because it's a number vaule and not a string. Can anyone think of any other reason why it might not work? Frank <?PHP $payment = "1"; function payment(){ global $payment; if ($payment == "0"){ header ('Location: http://ftudor/test/test_page.html'); } elseif ($payment == "1") { header ('Location: http://ftudor/test/test_page2.html'); } } ?> __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com |
|
|||
|
--- Frank Tudor <frank_tudor@yahoo.com> wrote:
> I am putting in the $payment="1"; so it will automatically go to > test_page2.html but it just sits there. [snip] > header ('Location: http://ftudor/test/test_page2.html'); What happens when you type it into your browser manually? http://ftudor/test/test_page2.html That might be your problem now. Chris ===== My Blog http://shiflett.org/ HTTP Developer's Handbook http://httphandbook.org/ RAMP Training Courses http://www.nyphp.org/ramp |
|
|||
|
I get my ugly purple test page
:) Frank --- Chris Shiflett <shiflett@php.net> wrote: > --- Frank Tudor <frank_tudor@yahoo.com> wrote: > > I am putting in the $payment="1"; so it will automatically > go to > > test_page2.html but it just sits there. > [snip] > > header ('Location: http://ftudor/test/test_page2.html'); > > What happens when you type it into your browser manually? > > http://ftudor/test/test_page2.html > > That might be your problem now. > > Chris > > ===== > My Blog > http://shiflett.org/ > HTTP Developer's Handbook > http://httphandbook.org/ > RAMP Training Courses > http://www.nyphp.org/ramp __________________________________ Do you Yahoo!? Exclusive Video Premiere - Britney Spears http://launch.yahoo.com/promos/britneyspears/ |