Possible Duplicate:
Cannot modify header information - headers already sent, Why its happening
Hi I am new with php and I was hoping you could help. I hav a function that uses the javascript alert:
Function promptuser($msg)
{
echo "<script type='text/
javascript'>
alert('$msg');
</script>";
}
Now I have saved this function under a file named 'prompt.php'.
Now in my main page:
Require ("prompt.php");
promptuser("you are in");
Header("location: index.php");
Exit;
The error i get:
"cannot modify header information - headers already sent...".
Please help Thanx