<body>
<p>We hope to see you again..</p>
<?php header('Location: http://something/com'); ?>
</body>
how come? I copy the syntax from w3school
<body>
<p>We hope to see you again..</p>
<?php header('Location: http://something/com'); ?>
</body>
how come? I copy the syntax from w3school
header() must be called before any actual output is sent, either by normal HTML tags, blank lines in a file, or from PHP. It is a very common error to read code with include, or require, functions, or another file access function, and have spaces or empty lines that are output before header() is called. The same problem exists when using a single PHP/HTML file.
You can do something like this:
<?php
$message = "We hope to see you again..";
header('Location: http://something/com?msg='.$message);
exit;
?>
And show your message in redirected page echo $_GET['msg'];
No whitespace before and heder() function. Header is before any output.
you need to put your code stat of that page
Like
<?php
header("Location: http://www.example.com/"); /* Redirect browser */
/* Make sure that code below does not get executed when we redirect. */
exit;
?>