Powered by Ajaxy
Digg StumbleUpon LinkedIn YouTube Flickr Facebook Twitter RSS Reset

Modifier les données du HTTP Cookie


{filelink=12540}

<html>
 
 <head>
 
 </head>
 
 <body>
<form action ="<?php echo $_SERVER['PHP_SELF']; ?>" method = "post">
 
  Tapez votre nom complet:
<input type = "text" name = "nom">
 
  Choisissez votre couleur
<input type = "radio" name = "couleur" value = "#FF0000">Rouge
<input type = "radio" name = "couleur" value = "#00FF00">Vert
<input type = "radio" name = "couleur" value = "#0000FF">Bleu
<input type = "submit" value = "submit">
  </form>
 
 </body>
 
</html>
<?php
  $nom =  $_POST['nom'];
  $couleur = $_POST['couleur'];
 
  if( ( $nom != null ) and ( $couleur != null ) )
  {
    setcookie( "Nom Complet", $nom , time() + 36000 );
    setcookie( "Couleur de profile", $couleur, time() + 36000 );
    header( "Location:modifCookie.php" );
    exit();
  }
?>

No comments yet.

Leave a Comment