• 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

$params[\'channels\'] don\'t accept $_POST[\'value\']

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

Post a reply
3 posts • Page 1 of 1

Postby F4314N0 » Wed Mar 05, 2008 5:57 pm

the $params['channels'] don't accept values from forms by POST method. example:

//input from form
$txtChannel = $_POST["txt_channel"];

$params["channels"] = array("".$txtChannel."");

when i enter in chat, show me the message: "missing parameter (/join {channelname})".
but in debug, we can see the values printed properly:
[channels] => Array
(
[0] => roomName
)

[frozen_channels] => Array
(
[0] => roomName
)

i'm using version 1.0-final.
thanks.
F4314N0
Member
 
Posts: 20
Joined: Wed Feb 20, 2008 3:00 am
Top

Postby shini » Mon Mar 31, 2008 10:02 am

You could not proceed like this since the "channels" param is cached; that means that you should have to rehash the configuration each time you want to refresh this parameter. You could try to set the 'channels' param to a dyn_param, but I'm not sure it's working...
shini
Member
 
Posts: 35
Joined: Wed Mar 05, 2008 2:10 pm
Top

Postby OldWolf » Mon Mar 31, 2008 1:40 pm

Actually, what you need to do is save the channel as a session value on the previous page, then load the chat. What your not seeing is the chat is effectively being refreshed oodles of times, so after the first load it looses the POST you sent it and tries to join a channel based on an empty variable. Make sure you don't set the session on the chat page or you'll have a similar problem.
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


Post a reply
3 posts • Page 1 of 1

Return to General Support (v1.x)

Who is online

Users browsing this forum: No registered users and 3 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