File "no_resubmit02.php"
Full Path: /home/analogde/www/Bookmarks/CHESS_ON/no_resubmit02.php
File size: 1.66 KB
MIME-type: text/x-php
Charset: utf-8
<?php
session_start();
/*if ( isset($_POST['pseudo']) && !empty($_POST['pseudo']) )
{
} */
$champ_pseudo = "";
$champ_message = "";
if(!empty($_POST) )
{
$_SESSION['sauvegarde_formulaire'] = $_POST ;
$page_actuelle = $_SERVER['PHP_SELF'] ;
if(!empty($_SERVER['QUERY_STRING']))
{
$page_actuelle .= '?' . $_SERVER['QUERY_STRING'] ;
}
header('Location: ' . $page_actuelle);
exit;
}
if(isset($_SESSION['sauvegarde_formulaire']))
{
$_POST = $_SESSION['sauvegarde_formulaire'] ;
echo '++ ' .$_POST['pseudo'] ." ++";
echo '++ ' .$_POST['message'] ." ++";
if(!empty($_POST["pseudo"]))
{ $champ_pseudo = $_POST["pseudo"];
}
if(!empty($_POST["message"]))
{ $champ_message = $_POST["message"];
}
$champ_pseudo = "";
$champ_message = "";
// header('Location: 5465interdiction.php');
unset($_SESSION['sauvegarde_formulaire']);
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr" lang="fr">
<head>
<title>Formulaire</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
</head>
<body>
<?php
?>
<form action="no_resubmit02.php" method="post">
<p>
Pseudo : <input type="text" name="pseudo" value = "<?php echo $champ_pseudo; ?>" /><br />
Message : <input type="text" name="message" value = "<?php echo $champ_message; ?>" /><br />
<input type="hidden" name="valide_form" id="valide_form" value = "<?php echo 'tito'; ?>" />
<input type="submit" value="Envoyer" />
</p>
</form>
</body>
</html>