Creare si Citire Cookie
Scris: Mie Oct 26, 2011
Cod: Selectaţi tot
<?php
session_start();
if(!isset($_COOKIE['bani'])){
$_COOKIE['bani']=10;}
echo '<b>Banii tai sunt:';
echo $_COOKIE['bani'];
echo '<br><br><a href="cazinou.php">Cazinou</a>';
?>
Cod: Selectaţi tot
<?php
session_start();
echo '<h2>Welcome</h2>';
echo 'Vrei sa joci?';
echo '<br>';
echo '<form method=post action=" " >
<input type=submit name=submit value=da></form>';
echo '<br>';
if(isset($_POST['submit'])){
echo 'Banii tai:';
echo $_COOKIE['bani'];
}
?>
nu-mi vede $_cookie['bani'];??
de ce?
multumesc