RE: [PHP-DB] sessions and page refresh?
| From: | Beau Lebens | Date: | Mon, 07 May 2001 06:06:00 +0000 |
| Subject: | RE: [PHP-DB] sessions and page refresh? | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-9144@lists.php.net to get a copy of this message | ||
if you just want to refresh same page, then there shouldn't really be a
need, if you just do something like
<?php
header("Expires: 0"); // Don't cache this page, so always load clean
header("Cache-Control: no-cache"); // as above
if ( session_is_registerd("variable_to_check_for") )
session_destroy();
rest of document
?>
or, if you mean refresh to another page, then you could use
<?php
header("Expires: 0"); // Don't cache this page, so always load clean
header("Cache-Control: no-cache"); // as above
if ( session_is_registerd("variable_to_check_for") )
session_destroy();
header("Location: new_page.php");
?>
the second one could also be used to send the location back to this page,
but make sure you do something conditional to keep the user out of an
endless loop :)
// -----Original Message-----
// From: DC [mailto:dave_news@NOSPAM-davecarrera.com]
// Sent: Monday, 7 May 2001 12:42 PM
// To: php-db@lists.php.net
// Subject: [PHP-DB] sessions and page refresh?
//
//
// Hi All
//
// I have a call to session_destroy();
//
// This works....
//
// But I also want to refresh the page as well.
//
// So onclick of button
//
// 1. session_destroy();
//
// 2 refresh page.
//
// Any help or ideas are welcome as always
//
// Thank you in advance
//
// Dave C
//
//
//
//
//
// --
// PHP Database Mailing List (http://www.php.net/)
// To unsubscribe, e-mail: php-db-unsubscribe@lists.php.net
// For additional commands, e-mail: php-db-help@lists.php.net
// To contact the list administrators, e-mail: php-list-admin@lists.php.net
//