• Forum
  • Doc
  • Screenshots
  • Download
  • Donate
  • Contributors
  • Contact
  • Follow @phpfreechat
  • DEMO
  • Board index ‹ Version 1.x branch ‹ General Support (v1.x)
  • Change font size
  • FAQ
  • Register
  • Login

Join Channel using redirect page and $_SESSION

Moderators: OldWolf, re*s.t.a.r.s.*2

Post a reply
22 posts • Page 2 of 2 • 1, 2

Postby Andaho » Sun Dec 26, 2010 2:53 am

I've added the following, but it still doesn't work...

Code: Select all
setcookie("channelcookie", $_GET["channel"]);
$params["channels"] = array("Die2Nite.net Lobby", $_COOKIE['channelcookie']);

I'm still getting the error: Missing parameter (/join {channelname})
Last edited by Andaho on Sun Dec 26, 2010 3:17 am, edited 1 time in total.
Andaho
Member
 
Posts: 14
Joined: Tue Dec 14, 2010 9:43 pm
Top

Postby re*s.t.a.r.s.*2 » Sun Dec 26, 2010 4:55 am

Cookies don't work the same as sessions cookies that code would never work...

Regards.
Free Singles Chat Rooms No Registration Required
Text and Chat Singles no need to register or app required
Sala De Bate Papo Online Grátis E Sem Cadastro
re*s.t.a.r.s.*2
Support Team
 
Posts: 612
Joined: Wed Sep 24, 2008 4:04 pm
Location: los angeles CA
  • Website
Top

Postby Andaho » Sun Dec 26, 2010 6:09 pm

so umm... can anyone tell me what I've done wrong with the cookie code? or is there a better way to achieve channels through the URL?
Andaho
Member
 
Posts: 14
Joined: Tue Dec 14, 2010 9:43 pm
Top

Postby OldWolf » Sun Dec 26, 2010 9:08 pm

You need to start the session on the index.php page.
Signature:
Read before Posting: Forum Rules
Note: I am unable to offer support through PM/e-mail at this time.
OldWolf
Site Admin
 
Posts: 1918
Joined: Sun Sep 23, 2007 5:48 am
Top

Postby Andaho » Thu Dec 30, 2010 9:45 am

OldWolf wrote:You need to start the session on the index.php page.

Ahh, thank you! I didn't realise you had to put session_start(); on every page :) It works using session now!
Andaho
Member
 
Posts: 14
Joined: Tue Dec 14, 2010 9:43 pm
Top

Postby re*s.t.a.r.s.*2 » Thu Dec 30, 2010 4:10 pm

Yeap, so newbie I always include the session and this time around was thinking that phpfreechat start it at line 24 in pfcuserconfig.class.php .
I guess I was so wrong.. thanks Olwolf
Free Singles Chat Rooms No Registration Required
Text and Chat Singles no need to register or app required
Sala De Bate Papo Online Grátis E Sem Cadastro
re*s.t.a.r.s.*2
Support Team
 
Posts: 612
Joined: Wed Sep 24, 2008 4:04 pm
Location: los angeles CA
  • Website
Top

Postby OldWolf » Sat Jan 01, 2011 7:31 pm

It would, but the variables will be empty UNTIL that happens. He's not passing a reference, he's passing a value... and until sessions start is called, that value is empty. :)
Signature:
Read before Posting: Forum Rules
Note: I am unable to offer support through PM/e-mail at this time.
OldWolf
Site Admin
 
Posts: 1918
Joined: Sun Sep 23, 2007 5:48 am
Top

Previous

Post a reply
22 posts • Page 2 of 2 • 1, 2

Return to General Support (v1.x)

Who is online

Users browsing this forum: No registered users and 4 guests

  • Board index
  • The team • Delete all board cookies • All times are UTC + 1 hour
Powered by phpBB® Forum Software © phpBB Group
Sign in
Wrong credentials
Sign up I forgot my password
.
jeu-gratuit.net | more partners
Fork me on GitHub