cookie not set

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    cookie not set

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

    PHP Code:
    $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

    #2
    did u start a session?
    PHP Code:
    session_start(); 
    Mobile chat, iphone chat, android chat, chat, rooms http://www.aiochat.com

    Comment


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

      Comment


        #4
        Originally posted by ori View Post
        You will also need session_name('nick'); as your setting that in cookie
        ok i will set the session name and give you reply.

        Added after 10 minutes:

        Originally posted by kevk3v View Post
        did u start a session?
        PHP Code:
        session_start(); 
        already start thanks 4 reply.
        Last edited by adex3g; 23.12.12, 09:54.
        have connected with http://adexchat.com ?
        Fun up with
        http://forum.adexchat.com

        Comment


          #5
          PHP Code:
          <?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...

          ?>
          Last edited by kevk3v; 24.12.12, 06:54.
          Mobile chat, iphone chat, android chat, chat, rooms http://www.aiochat.com

          Comment

          Working...
          X