shamsuljewel Posted July 6, 2007 Share Posted July 6, 2007 A form pass two variable a textarea and a radio if anyone is empty the browser was redirect to the form again. I am using if(($_post[text1]=="") || ($_post[func]=="")) { header("Location: generic_form.htm"); exit; } but I found an error that is "Warning: Cannot modify header information - headers already sent by (output started at c:\Inetpub\wwwroot\pra...." Where is the problem? can anyone help me? thanks Quote Link to comment Share on other sites More sharing options...
NArc0t1c Posted July 6, 2007 Share Posted July 6, 2007 Any cookies set on the page before the if statement? and use post with the caps, easier to read.. if($_POST['text1'] == '' || $_POST['func'] == '') { header("Location: generic_form.htm"); exit; } Quote Link to comment Share on other sites More sharing options...
shamsuljewel Posted July 6, 2007 Author Share Posted July 6, 2007 Yes I solve it. php block should write at the top of the code. Thanks Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.