iconicCreator Posted February 14, 2009 Share Posted February 14, 2009 I'm using session to indicate senders name on a form confirmation page. So if the user submits a page, the form is redirected to a confirmation page. The problem is if you don't manually clear the cookies and you send the page again, the old name still goes to the confirmation page even if you typed a new name. The idea of using the user first name on the page was to make it "more personal." Like Thanks BOB for your message: Is there a way around this? This is the confirmation page code: <?php session_start(); // at the top again ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Confirmation - Thanks for the feedback!</title> </head> <body> <div class="confirmation">Thanks <span class="sendersName"><?php echo isset($_SESSION['firstName']) ? $_SESSION['firstName'] : '' ?></span> for evaluating our product, we will contact you within 24 hours.</div> </div> </body> </html> And this code is in the form and Session start is at the top: $_SESSION['firstName'] = $firstName; header('Location: http://www.confirm.com/confirmation.php'); Quote Link to comment Share on other sites More sharing options...
blueman378 Posted February 14, 2009 Share Posted February 14, 2009 why dont you erase the session on the end of the next page? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.