note 97070 added to function.setcookie
| From: | DelioAristizbal at osu1 dot php dot net | Date: | Wed, 31 Mar 2010 07:27:37 +0000 |
| Subject: | note 97070 added to function.setcookie | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-167546@lists.php.net to get a copy of this message | ||
<?php
setcookie("Vrs_Cookie[Nombres]", "Isabel Cristina");
setcookie("Vrs_Cookie[Apellidos]", "Aristizábal Cardona");
setcookie("Vrs_Cookie[Carrera]", "Sist. de Información");
$_COOKIE[Vrs_Cookie][Visitas]++;
setcookie("Vrs_Cookie[Visitas]", $_COOKIE[Vrs_Cookie][Visitas] );
// after the page reloads, print them out
if (isset($_COOKIE['Vrs_Cookie']))
{
foreach ($_COOKIE['Vrs_Cookie'] as $name => $value) {
echo "$name : $value <br />";
}
}
?>
<HTML>
<HEAD> <TITLE> Crea y Muestra los valores de la Cookie </TITLE> </HEAD>
<BODY>
<FORM METHOD="post" ACTION="Cookie_VariosVrs.php">
<?php
echo "Bienvenido.: " . $_COOKIE[Vrs_Cookie][Nombres] . " " .
$_COOKIE[Vrs_Cookie][Apellidos] . "<br><BR>";
echo "Carrera: " . $_COOKIE[Vrs_Cookie][Carrera] .
"<br><BR>";
echo "Gracias por su visita Nro.: " . $_COOKIE[Vrs_Cookie][Visitas] .
"<br><BR>";
?>
<INPUT TYPE='submit' NAME='btnRetornar' VALUE='Retornar'>
</FORM>
</BODY>
</HTML>
----
Server IP: 190.90.160.68
Probable Submitter: 200.116.64.240 (proxied: 200.116.64.240)
----
Manual Page -- http://www.php.net/manual/en/function.setcookie.php
Edit -- https://master.php.net/note/edit/97070
Del: integrated -- https://master.php.net/note/delete/97070/integrated
Del: useless -- https://master.php.net/note/delete/97070/useless
Del: bad code -- https://master.php.net/note/delete/97070/bad+code
Del: spam -- https://master.php.net/note/delete/97070/spam
Del: non-english -- https://master.php.net/note/delete/97070/non-english
Del: in docs -- https://master.php.net/note/delete/97070/in+docs
Del: other reasons-- https://master.php.net/note/delete/97070
Reject -- https://master.php.net/note/reject/97070
Search -- https://master.php.net/manage/user-notes.php