RE: [PHP] RE: function help redirect help

2003-10-27 Thread Gregory Kornblum
Remove the second 'global $payment;'. Regards. -Gregory -Original Message- From: Frank Tudor [mailto:[EMAIL PROTECTED] Sent: Monday, October 27, 2003 2:01 PM To: 1PHP Subject: [PHP] RE: function help redirect help Here is what Ihave I am getting a elseif parse error. Is there

Re: [PHP] RE: function help redirect help

2003-10-27 Thread Chris Shiflett
--- Frank Tudor [EMAIL PROTECTED] wrote: I am getting a elseif parse error. Let me clean up your code a bit, and hopefully the error will stand out. function payment() { global $payment; if ($payment == '0'); header ('Location: http://example.org/test_page.html'); } global

Re: [PHP] RE: function help redirect help

2003-10-27 Thread Frank Tudor
I made the changes but I am getting: Parse error: parse error, unexpected T_ELSEIF I did take the second global statement out after I cut and pasted your code and modified the urls so now here is what it looks like (the whole thing). Frank ?PHP $payment = 1; function payment() {

Re: [PHP] RE: function help redirect help

2003-10-27 Thread Chris Shiflett
--- Frank Tudor [EMAIL PROTECTED] wrote: 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'); } Your code looks

Re: [PHP] RE: function help redirect help

2003-10-27 Thread DvDmanDT
Can you see the problem(s) now? Never underestimate the benefits of writing clean code. :-) Hehe, you should see my code.. function dp_neg($v1,$v2){ $neg = ((substr((string)$v1,0,1)==-)||((substr((string)$v2,0,1)==-))); $bneg= ((substr((string)$v1,0,1)==-)((substr((string)$v2,0,1)==-)));

Re: [PHP] RE: function help redirect help

2003-10-27 Thread Chris Shiflett
--- DvDmanDT [EMAIL PROTECTED] wrote: Can you see the problem(s) now? Never underestimate the benefits of writing clean code. :-) Hehe, you should see my code.. Yes, very messy and disorganized. Is this an admission of guilt, a cry for help, or what? Chris = My Blog