Page 1 of 1

Warning: Cannot modify header information ...

Posted: Sun Nov 06, 2011 2:10 am
by zura
Header(); does not works. Warning: Cannot modify header information - headers already sent by (output started at /home/sanikidz/domains/...).

Code: Select all


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

Re: Warning: Cannot modify header information ...

Posted: Mon Nov 07, 2011 12:12 am
by Christopher
You probably have a space or return before the opening <?php. Why do you have the output buffering calls around that code? They are not needed.