Hiya, just need help with PHP headers.
I have an index php page which has the following code within a header
redirect:
<?php
if ( empty($_GET['month']) )
if (empty($_GET['year']) )
{
$month = date(n);
$year = date(Y);
header("Locatio n: index.php?month =$month&year=$y ear");
}
?>
On the same index.php page, I have a shoutbox (include file) which inputs
the content of the shoutbox form into a database. After the user fills out
the form, I want the index page to refresh again because if I leave it as it
is and a user inputs info into the form, if they press refresh, the form
resubmits thus recording two entries into the shoutbox, or however many
times refresh is pressed.
When I add a header redirect into the shoutbox include file, once the user
clicks on send, index.php throws a headers cannot be sent error message.
Can anyone help?
Cheers.
I have an index php page which has the following code within a header
redirect:
<?php
if ( empty($_GET['month']) )
if (empty($_GET['year']) )
{
$month = date(n);
$year = date(Y);
header("Locatio n: index.php?month =$month&year=$y ear");
}
?>
On the same index.php page, I have a shoutbox (include file) which inputs
the content of the shoutbox form into a database. After the user fills out
the form, I want the index page to refresh again because if I leave it as it
is and a user inputs info into the form, if they press refresh, the form
resubmits thus recording two entries into the shoutbox, or however many
times refresh is pressed.
When I add a header redirect into the shoutbox include file, once the user
clicks on send, index.php throws a headers cannot be sent error message.
Can anyone help?
Cheers.
Comment