Bluehost.com Web Hosting $6.95

RE: function help simple redirect

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 - ...


Go Back   Usenet Forums > PHP Programming Forums > PHP General

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 10-27-2003
Frank Tudor
 
Posts: n/a
Default RE: function help simple redirect

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/
Reply With Quote
  #2 (permalink)  
Old 10-27-2003
Dvdmandt
 
Posts: n/a
Default Re: function help simple redirect

$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/

Reply With Quote
  #3 (permalink)  
Old 10-27-2003
Frank Tudor
 
Posts: n/a
Default Re: [PHP] Re: function help simple redirect

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
Reply With Quote
  #4 (permalink)  
Old 10-27-2003
Chris Shiflett
 
Posts: n/a
Default Re: [PHP] Re: function help simple redirect

--- 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
Reply With Quote
  #5 (permalink)  
Old 10-27-2003
Frank Tudor
 
Posts: n/a
Default Re: [PHP] Re: function help simple redirect

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/
Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT +1. The time now is 03:46 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0