manual/en/features.cookies.php
ARCHIVED 2003-08-05, DATE APPROXIMATE · VERSION 20030805_rev01 · COMPARED WITH 20030618_rev01
Full text changes — 20030618_rev01 to 20030805_rev01
COLOUR MARKS THE SEVERITY OF A FLAGGED CLAUSE · + AND − MARK ADDED AND REMOVED
| 5 | 5 | Any cookies sent to you from the client will automatically be turned into a PHP variable just like GET and POST method data, depending on the register\_globals and variables\_order configuration variables. If you wish to assign multiple values to a single cookie, just add _\[\]_ to the cookie name. |
| 6 | 6 | |
| 7 | 7 | In PHP 4.1.0 and later, the $\_COOKIE auto-global array will always be set with any cookies sent from the client. $HTTP\_COOKIE\_VARS is also set in earlier versions of PHP when the track\_vars configuration variable is set. |
| 8 | 8 | |
| 9 | 9 | For more details, including notes on browser bugs, see the [**setcookie()**](http://www.php.net/manual/en/function.setcookie.php) function. |
| 10 | 10 | |
| 11 | <table><tbody><tr><td><small>User Contributed Notes</small><br><b>Cookies</b></td><td><a href="http://www.php.net/manual/add-note.php?sect=features.cookies&redirect=http://www.php.net/manual/en/features.cookies.php"><img src="http://static.php.net/www.php.net/images/notes-add.gif" alt="add a note" width="13" height="13"></a> <small><a href="http://www.php.net/manual/add-note.php?sect=features.cookies&redirect=http://www.php.net/manual/en/features.cookies.php">add a note</a></small></td></tr><tr><td colspan="2">There are no user contributed notes for this page.</td></tr></tbody></table> | |
| 11 | <table><tbody><tr><td><small>User Contributed Notes</small><br><b>Cookies</b></td><td><a href="http://www.php.net/manual/add-note.php?sect=features.cookies&redirect=http://www.php.net/manual/en/features.cookies.php"><img src="http://static.php.net/www.php.net/images/notes-add.gif" alt="add a note" width="13" height="13"></a> <small><a href="http://www.php.net/manual/add-note.php?sect=features.cookies&redirect=http://www.php.net/manual/en/features.cookies.php">add a note</a></small></td></tr><tr><td colspan="2"><a name="#34157"></a><table><tbody><tr><td><b>wilton at intertranet dot com</b><br>17-Jul-2003 05:14</td><td><br></td></tr><tr><td colspan="2"><code>if ((isset($aid)) && (isset($pwd)) && ($op == "login")) {<br> if($aid!="" AND $pwd!="") {<br>$pwd = md5($pwd);<br>$result=sql_query("select pwd, admlanguage from ".$prefix."_authors where aid='$aid'", $dbi);<br>list($pass, $admlanguage)=sql_fetch_row($result, $dbi);<br>if($pass == $pwd) {<br> $admin = base64_encode("$aid:$pwd:$admlanguage");<br> setcookie("admin","$admin",time()+3600);<br> unset($op);<br>}<br> }<br>}<p>$admintest = 0;</p><p>if(isset($admin) && $admin != "") {<br>$admin = base64_decode($admin);<br> $admin = explode(":", $admin);<br> $aid = "$admin[0]";<br> $pwd = "$admin[1]";<br> $admlanguage = "$admin[2]";<br> if ($aid=="" || $pwd=="") {<br> $admintest=0;<br> echo "<html>\n";<br> echo "<title>Ingreso prohibido</title>\n";<br> echo "<body bgcolor=\"#FFFFFF\" text=\"#000000\">\n\n</p><p>\n\n";<br> echo "<center><img src=\"images/logo.gif\" border=\"0\"></p><p>\n";<br> echo "<font face=\"Verdana\" size=\"+4\"><b>Su Ip esta siendo registrada en nuestra base de datos, toda operaci�n indebida ser� investigada.</p><p>Gerencia Administrativa</b></font></center>\n";<br> echo "</body>\n";<br> echo "</html>\n";</p></code><br></td></tr></tbody></table></td></tr><tr><td colspan="2"><a href="http://www.php.net/manual/add-note.php?sect=features.cookies&redirect=http://www.php.net/manual/en/features.cookies.php"><img src="http://static.php.net/www.php.net/images/notes-add.gif" alt="add a note" width="13" height="13"></a> <small><a href="http://www.php.net/manual/add-note.php?sect=features.cookies&redirect=http://www.php.net/manual/en/features.cookies.php">add a note</a></small></td></tr></tbody></table> |