SunQuest
 
           General Programming Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsProgrammingGeneral Programming Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
SlickEdit: Code in over 40 languages across 7 platforms. SlickEdit’s unmatched power, speed, and flexibility allows even the most accomplished developers to write better code faster. Download a free trial today!
  #1  
Old December 12th, 2002, 08:06 PM
latiszm latiszm is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Nov 2002
Posts: 3 latiszm User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
setcookie error!

setcookie("level", $level, "login", $loggedin);
Im getting level from the database and its ok...
im setting $loggedin to ja
and it works if I remove "login", $loggedin);
why?
The errormessage is:
Warning: setcookie() expects parameter 3 to be long, string given in F:\apache\Apache2\htdocs\hideout2\check_login.php on line 20


and line 20:
setcookie("level", $level, "login", $loggedin);


PLZ HELP!

Best Regards
LatisZM

Reply With Quote
  #2  
Old December 13th, 2002, 06:10 PM
Jeb. Jeb. is offline
"l33t? What's l33t?"
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Aug 2002
Posts: 51 Jeb. User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 6
Send a message via AIM to Jeb.
setcookie() syntax:

boolean setcookie ( string name [, string value [, int expire [, string path [, string domain [, int secure]]]]] )

Your third parameter must be a timestamp that indicates when the cookie will expire. It appears that you want to set 2 cookies, if that is the case you would call setcookie twice

PHP Code:
 setcookie("level"$leveltime()+3600); // expire in 1 hour
setcookie("login"$loggedintime()+3600); // expire in 1 hour also 
__________________
Jeb.

AIM: JebediahMc - PM Me - E-Mail Me


Last edited by Jeb. : December 13th, 2002 at 06:13 PM.

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingGeneral Programming Help > setcookie error!


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 

Iron Speed




© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway