Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Warning: Cannot modify header information ...

Status
Not open for further replies.

zura

Technical User
Sep 20, 2011
23
GE
Header(); does not works. Warning: Cannot modify header information - headers already sent by (output started at /home/sanikidz/domains/...).

Code:
<?php
ob_start();
$nomeri = $_POST['operator'].$_POST['cellular'];
$messageText = $_POST['message'];
$e = "[URL unfurl="true"]http://smsc.ru/sys/send.php?login=zura&psw=1111&phones=".$nomeri."&mes=".$messageText;[/URL]
header("Location: $e");
if ($e == "true") echo "was sent!";
ob_end_flush();
?>

Thanks for help.
 
You CANNOT send headers AFTER output has been sent to the useragent.

Even a blank line or a space sent to the UA is output.

Make sure there is nothing at all before the opening php delimiter.

Chris.

Indifference will be the downfall of mankind, but who cares?
Time flies like an arrow, however, fruit flies like a banana.
Webmaster Forum
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top