brown2005 Posted November 7, 2007 Share Posted November 7, 2007 elseif($saction == "submit") { $name = $_POST['name'] ? $_POST['name'] : ""; $email = $_POST['email'] ? $_POST['email'] : ""; $subject = $_POST['subject'] ? $_POST['subject'] : ""; $message = $_POST['message'] ? $_POST['message'] : ""; $priority = $_POST['priority'] ? $_POST['priority'] : ""; echo" name - $name <br> email - $email <br> subject - $subject <br> message - $message <br> priority - $priority"; header("location: $config_website_url/$config_website_url_topic/files/help.php?&view=helpdesk&action=email_us&saction=complete"); } i have that code at the moment, but it says headers have already been sent. is there any way around this, or should i put the process code in a separate php file... thanks... Quote Link to comment Share on other sites More sharing options...
rajivgonsalves Posted November 7, 2007 Share Posted November 7, 2007 this is because you outputted something to the browser before using header. remove the echo statements Quote Link to comment Share on other sites More sharing options...
NArc0t1c Posted November 7, 2007 Share Posted November 7, 2007 You can use the ob_start function in the top of your script to fix header errors. Quote Link to comment Share on other sites More sharing options...
aschk Posted November 7, 2007 Share Posted November 7, 2007 Don't use ob_start unless you ABSOLUTELY have to. My question is why are you trying to output something to a page which won't even get shown if you're redirecting.... Those echo's should never occur, no-one will ever see them. 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.