cookie not set

Started on the old forum in December 2012 · view the original in the archive · old links redirect here

4 replies · 385 views · started 13 years ago · 1 min read

3 participants
adex3g Developer · 181 posts #1

Please what is worry with this, the cookie not set.

$c_time = 10;
$_SESSION['nick'] = "adex3g";
setcookie("nick",$_SESSION['nick'], time()+60*60*24*$c_time, "/");

have connected with http://adexchat.com ? Fun up with http://forum.adexchat.com

ori Lead · 512 posts #3

You will also need session_name('nick'); as your setting that in cookie

kevk3v Senior · 332 posts #5
<?php

session_start();

$_SESSION['nick'] = "adex3g"; 

$c_time = 10;
$expire = time()+60*60*24*$c_time;

$nick = $_SESSION["nick"];
setcookie("nick",$nick, $expire);  

//// to get the cookie echo $_COOKIE["nick"];
//// i dont get why you're using sessions and cookies though...

?>

Mobile chat, iphone chat, android chat, chat, rooms http://www.aiochat.com

Sign in to reply.

Similar topics

Keyboard shortcuts

g f
Go to forums
g h
Go to your feed
g m
Go to messages
r
Reply (in a topic)
/
Search
j
Next post
k
Previous post
?
This list
Ctrl/⌘ + Enter
Send what you are writing
Ctrl/⌘ + B / I
Bold / italic while writing
Esc
Close