Merhaba, Ziyaretçi. Lütfen giriş yapın veya üye olun.
Aktivasyon mailiniz gelmediyse buraya tıklayın.
05, 2008, 07:31:33 pm
42717 Mesaj 8081 Konu Gönderen: 17909 Üye
Son üye: bytasarimci
Turk-Php.Com Forum  |  Yardım Forumları  |  PHP Yardım Forumu  |  setcookie ile array oluşturma [Anlatım] « önceki sonraki »
Sayfa: [1] Yazdır
Yazan Konu: setcookie ile array oluşturma [Anlatım]  (Okunma Sayısı 271 defa)
HoiRaT
Ziyaretçi


E-Posta
setcookie ile array oluşturma [Anlatım]
« : 03, 2006, 07:17:38 am »

Aslında mantığı basit. Umarım işinize yarar.

Kod:
<?php

// Set variables
$time time()+3600;
$hoirat $_COOKIE['hoirat'];

if (empty(
$hoirat)) {

// Send some cookies as an array
setcookie('hoirat[php]''coder'$time);
setcookie('hoirat[html]''designer'$time);
setcookie('hoirat[pc]''freak'$time);
setcookie('hoirat[game]''maniac'$time);

echo 'Some cookies had been send. Please refresh your browser to take effects...';

} else {

// Output: Array ( [php] => coder [html] => designer [pc] => freak [game] => maniac )
print_r($hoirat);

}

?>

Logged
Sayfa: [1] Yazdır 
« önceki sonraki »
Gitmek istediğiniz yer:  


Turk-Php.Com Forum | SMF Forum Software © 2005, Simple Machines LLC. All Rights Reserved.