[PHP] 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/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] 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/default.asp?id=helpCenterhcName=swen http://securityresponse.symantec.com/avcenter/venc/data/[EMAIL PROTECTED] ## Frank Tudor [EMAIL PROTECTED] skrev i meddelandet news:[EMAIL PROTECTED] 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/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
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 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: function help simple redirect
--- Frank Tudor [EMAIL PROTECTED] 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 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Re: function help simple redirect
On Monday, October 27, 2003 11:26 AM, Frank Tudor wrote: This one worked (kinda) I have no more errors but it doesn't do the redirect (hmmm)?? ?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'); } } ? You need to add payment(); to your php code. The function is defined, but it's not going to do anything until you call it. Cheers, Pablo -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: function help simple redirect
I get my ugly purple test page :) Frank --- Chris Shiflett [EMAIL PROTECTED] wrote: --- Frank Tudor [EMAIL PROTECTED] 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/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Re: function help simple redirect
Oh?!?! Sweet! thanks... let me try that and get back to the group :) --- Pablo Gosse [EMAIL PROTECTED] wrote: On Monday, October 27, 2003 11:26 AM, Frank Tudor wrote: This one worked (kinda) I have no more errors but it doesn't do the redirect (hmmm)?? ?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'); } } ? You need to add payment(); to your php code. The function is defined, but it's not going to do anything until you call it. Cheers, Pablo __ Do you Yahoo!? Exclusive Video Premiere - Britney Spears http://launch.yahoo.com/promos/britneyspears/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Re: function help simple redirect
Shit! payment(); WORKS! Thank for teach me how to do a function guys!!! Frank --- Frank Tudor [EMAIL PROTECTED] wrote: Oh?!?! Sweet! thanks... let me try that and get back to the group :) --- Pablo Gosse [EMAIL PROTECTED] wrote: On Monday, October 27, 2003 11:26 AM, Frank Tudor wrote: This one worked (kinda) I have no more errors but it doesn't do the redirect (hmmm)?? ?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'); } } ? You need to add payment(); to your php code. The function is defined, but it's not going to do anything until you call it. Cheers, Pablo __ Do you Yahoo!? Exclusive Video Premiere - Britney Spears http://launch.yahoo.com/promos/britneyspears/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php __ Do you Yahoo!? Exclusive Video Premiere - Britney Spears http://launch.yahoo.com/promos/britneyspears/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php