--- 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 cleaner, so now isn't the error very obvious? It seems to me that you intended your first conditional statement to send the Location header when true. Therefore, you did not mean to put a semicolon there but rather a curly brace. This is why your function ends prematurely (assuming you did not intend for it to end there), and then you have an elseif statement dangling around with no corresponding if. 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