Search
Left Quote    I find that the harder I work, the more luck I seem to have.
- Thomas Jefferson    
Right Quote
 
[login] | [Register]
Forum Index » PHP and mySQL » Viewing Topic and Replies
Post Reply


        Viewing Topic: How to make cookies?
  This user is offline  UnknownZ
  Subject: "How to make cookies?" Posted: @ 9:38 pm on Jun 03 2005   
Member #: 47
Rank: User - (29)
Since: 06/02/05
Posts: 29

I have been trying to make cookies to be saved on my computer, but it does not work.. ..could someone please guide me?
Here is what I am doing..

Code:

<?php
require "start.php ";
$username = $User->user;

if($User->lo gged == TRUE){
$Display->ti tle_from_none(& quot;|||Members |||Logged In" );
setcookie(" ;member",$ username,time() +1957240," /",$Vars-& gt;cfg['site_do main']);
$member = $username;
$Display->ou tput .= $Display->lo ad_template(&qu ot;logged_in&qu ot; );
$Display->ou tput();
}else{
$Display->me ssage("You are not logged in!<br>&l t;Br><a href=/login.php >Click Here</a> to do so." );
}
?>



Thanks in advance..

Edited at 09:45:07 pm on 06/03/05


    Viewed: 12,085 Times | Reply to This | To top
  This user is offline  bs0d
  Subject: "re: How to make cookies?" Posted: @ 12:17 pm on Jun 04 2005    

Member #: 1
Rank: Admin. - (1,505)
Since: 02/06/05
Posts: 600
From: USA

Im gonna write a tutorial on this




-bs0d | AllSyntax.com

    Viewed: 12,073 Times | Reply to This | To top
  This user is offline  UnknownZ
  Subject: "re: How to make cookies?" Posted: @ 8:08 pm on Jun 04 2005    
Member #: 47
Rank: User - (29)
Since: 06/02/05
Posts: 29

LoL..please be quick..
I need to finish my website as soon as possible, because in about 3 weeks, I will gonna have exams..




    Viewed: 12,069 Times | Reply to This | To top
  This user is offline  bs0d
  Subject: "re: How to make cookies?" Posted: @ 9:57 pm on Jun 04 2005    

Member #: 1
Rank: Admin. - (1,505)
Since: 02/06/05
Posts: 600
From: USA

lol; I'll do a writeup this weekend. I started to post but it would be long and tutorial form would be much better! Will likely have it done sunday




-bs0d | AllSyntax.com

    Viewed: 12,066 Times | Reply to This | To top
  This user is offline  UnknownZ
  Subject: "re: How to make cookies?" Posted: @ 12:03 am on Jun 04 2005    
Member #: 47
Rank: User - (29)
Since: 06/02/05
Posts: 29

great...




    Viewed: 12,063 Times | Reply to This | To top
  This user is offline  UnknownZ
  Subject: "re: How to make cookies?" Posted: @ 5:17 pm on Jun 05 2005    
Member #: 47
Rank: User - (29)
Since: 06/02/05
Posts: 29

I just finished fixing the cookie problem...
The problem was with this part:
$username = $User->user; --> I deleted this one
and this part
setcookie(&quo t;member" ,$username,time ()+1957240,&qu ot;/",$Va rs->cfg['si te_domain']);

I changed to
setcookie(&quo t;member" ,$user,time()+1 957240,"/ ";

and it works...




    Viewed: 12,059 Times | Reply to This | To top
  This user is offline  bs0d
  Subject: "re: How to make cookies?" Posted: @ 5:45 pm on Jun 05 2005    

Member #: 1
Rank: Admin. - (1,505)
Since: 02/06/05
Posts: 600
From: USA

cool! now I dont feel pressured to finish the tutorial Glad you figured the problem out. PHP.NET - setcookie describes the function well




-bs0d | AllSyntax.com

    Viewed: 12,054 Times | Reply to This | To top
  This user is offline  UnknownZ
  Subject: "re: How to make cookies?" Posted: @ 2:54 am on Jun 05 2005    
Member #: 47
Rank: User - (29)
Since: 06/02/05
Posts: 29

LoL..




    Viewed: 12,050 Times | Reply to This | To top
Viewing Page: 1 of 1


1 |

You must be logged in to post on the forums. Login or Register








"AllSyntax.com" Copyright © 2002-2018; All rights lefted, all lefts righted.
Privacy Policy  |  Internet Rank