Header help
From: DaRemedy (demonnet_at_btinternet.com.nospam)
Date: 09/26/04
- Next message: Janwillem Borleffs: "Re: Header help"
- Previous message: Charles: "Encrypting PHP source code"
- Next in thread: Janwillem Borleffs: "Re: Header help"
- Maybe reply: Janwillem Borleffs: "Re: Header help"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Sun, 26 Sep 2004 19:23:42 +0000 (UTC)
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("Location: index.php?month=$month&year=$year");
}
?>
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.
- Next message: Janwillem Borleffs: "Re: Header help"
- Previous message: Charles: "Encrypting PHP source code"
- Next in thread: Janwillem Borleffs: "Re: Header help"
- Maybe reply: Janwillem Borleffs: "Re: Header help"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|