COMPUTER LEARNING CENTER
WWW.HUUKHANG.COM
Hình 5-10: Duøng $HTTP_COOKIE_VARS
Baèng caùch söû duïng haøm session_get_cookie_params ñeå laáy giaù trò cuûa cookie tröôùc ñoù
trong trang sessiongetcookie.php nhö ví duï 5-11.
Ví duï 5-11: Söû duïng session_get_cookie_params
<?php
session_start();
$myvalue=
session_get_cookie_params();
echo
$myvalue[1];
?>
<HTML>
<HEAD>
<TITLE>::Welcome to PHP</TITLE>
</HEAD>
<BODY>
<h4>Get Cookie</h4>
</BODY>
</HTML>
3.
KEÁT LUAÄN
Trong baøi naøy, chuùng ta tìm hieåu caùch söû duïng bieán session vaø cookie.
Giaùo vieân: Phaïm Höõu Khang