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:[EMAIL PROTECTED]]
// Sent: Monday, 7 May 2001 12:42 PM
// To: [EMAIL PROTECTED]
// 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: [EMAIL PROTECTED]
// For additional commands, e-mail: [EMAIL PROTECTED]
// To contact the list administrators, e-mail: [EMAIL PROTECTED]
//


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to