Can someone help me with my mailform? It uses a Flash mailform, together with php and session id.
First things first: in the index.php page it starts by setting the session:
<?php
session_start();
$_SESSION["domino"] = true;
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
//rest of page showing flash movie
When inputed the flash form and clicking send the php script processes the data by first checking for the existence of this session id. If it's not ok, an error message returns.
If everything is ok and a session id is present, the session id itself is unset. I've been told that you should immediatelly unset a session id after using it for security reasons.
<?php
session_start();
if(!isset($_SESSION["domino"])){
//error message 'forbidden access'
exit;
} else {
session_destroy();
unset ($_SESSION["domino"]);
//rest of script: processing the form input
}
But now, when I input the flash form once more and click send, of course nothing happens because the session id is cleared. And I can't set the session id in Flash itself I think.
Is there any way to fix this?