Current location: Hot Scripts Forums » Programming Languages » PHP » help greatly appreciated : )


help greatly appreciated : )

Reply
  #1 (permalink)  
Old 05-30-04, 12:32 AM
krmoon krmoon is offline
Newbie Coder
 
Join Date: May 2004
Posts: 15
Thanks: 0
Thanked 0 Times in 0 Posts
help greatly appreciated : )

I'm having some problems trying to update an older version of PHP session handling

the code looks like this.....

PHP initial page:

unset($auth);
setcookie(session_name());
session_start();
session_destroy();
$auth=DBFetchRow($sql);
$auth["adtype"]=$adtype;
session_set_cookie_params(3600, "/");
session_start();
header("Location: blah blah blah);

And then on the next page:

unset($auth);
session_start();

The error I am getting looks like this:

Warning: session_start(): The session id contains invalid characters, valid characters are only a-z, A-Z and 0-9 in http:mypage.auth.php on line 24

Does anyone know how to fix this problem????

Thanks so much!! : )
Reply With Quote
  #2 (permalink)  
Old 05-30-04, 05:52 AM
Skeleton Man Skeleton Man is offline
Community Liaison
 
Join Date: Jun 2003
Location: Australia
Posts: 406
Thanks: 0
Thanked 0 Times in 0 Posts
You shouldn't need to set cookies yourself for the sessions, there are options to use cookies for sessions, and even use solely cookies for sessions.

You may want to read up on session handling here:
http://www.php.net/manual/en/ref.session.php
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
any feedback appreciated munricer Website Reviews 5 06-01-04 08:41 AM
Thoughts & suggestions appreciated mdhall Website Reviews 0 11-11-03 12:02 PM


All times are GMT -5. The time now is 10:36 AM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.