Header function giving me trouble

Posted by Mneva skoko on Stack Overflow See other posts from Stack Overflow or by Mneva skoko
Published on 2010-04-24T21:31:02Z Indexed on 2010/04/24 21:33 UTC
Read the original article Hit count: 105

Filed under:
|

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 " alert('$msg'); "; } 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

© Stack Overflow or respective owner

Related posts about php

Related posts about redirect