I have a log out button in a php file.
When clicked the button calls the $logoutAction2 function
<a href="<?php echo $logoutAction2 ?>"><img src="../../images/log_out2.png" width="73" height="71" border="0" /></a>
require_once('../../includes/functions.php');
logout1();
Code from functions.php
function logout1(){
global $logoutAction2;
$logoutAction2 = $_SERVER['PHP_SELF']."?doLogout=true";
if ((isset($_SERVER['QUERY_STRING'])) && ($_SERVER['QUERY_STRING'] != "")){
$logoutAction2 .="&". htmlentities($_SERVER['QUERY_STRING']);
}
if ((isset($_GET['doLogout'])) &&($_GET['doLogout']=="true")){
//to fully log out a visitor we need to clear the session varialbles
$_SESSION['MM_Username'] = NULL;
$_SESSION['MM_UserGroup'] = NULL;
$_SESSION['PrevUrl'] = NULL;
unset($_SESSION['MM_Username']);
unset($_SESSION['MM_UserGroup']);
unset($_SESSION['PrevUrl']);
$logoutGoTo = "../../login.php";
if ($logoutGoTo) {
header("Location: $logoutGoTo");
exit;
}
}
}
I would like to replace the button with a button in a swf file.
Until now I have used getURL to open other pages from flash.
Is there a way to call $logoutAction2 using getURL?
If not is there another way?
Regards Maxwell
How to call a php function from a swf file
Saturday, June 16, 2012
[Action Script] How to call a php function from a swf file June,2012
Posted by Bimo Hery Prabowo at 3:13 PM
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment