But to clarify, are you getting a little dialog box that asks you to resubmit the data or cancel? OR is it an actual error page from IE?
I get an error page from IE saying that the page isn't valid any more (I think that's what IE would tell me if I was using an english version anyway. I'm using the swedish one, so it's just a rough translation).
What I'm trying to do is not returning to a form to resend it, but rather step backwards through my menu system. My menu is built by multiple forms, all having to following syntax:
<form method="post" action="article_view_issue.php"> <select name="show_article_issue" OnChange = form.submit()> <option>Visa nummer <?php db_connect($dbuser, $dbpassword, $dbdatabase); $query = "SELECT i_date FROM un_issue WHERE i_date > CURDATE()"; $result = mysql_query($query); while ($row = mysql_fetch_row($result)) { ?> <option value="<?php echo $row[0]; ?>"><?php echo $row[0] . "\n"; ?> <?php } ?> </select> </form>
I'm also starting every page in the system with a call to my function accesscontrol() that checks if certain session variables, like username and password, are set. If, they are validated, if not, the login page are shown.
Pressing reload causes the login page to show up, and that's why my guess is that the session variables for some reason are reseted.
Accesscontrol() is 134 lines of code, and I don't know which parts might be of interest here. At log in, username and password are stored to two session variables:
$_SESSION['uname'] = $_POST['uname']; $_SESSION['pwd'] = $_POST['pwd'];
Everytime accesscontrol() is called, I make three if-checks:
if(isset($_SESSION['uname'])) {
Validate already logged in users.
}
elseif(isset($_POST['uname']))
{
Login-form just filled in. Validate.
}
else
{
If neither $_POST['uname'] nor $_SESSION['uname'] is set, here I display the login form
}
And since reloads brings up the login form, $_SESSION['uname'] is not set anymore, for some reason.
//Anders
-- anders thoresson
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php