Registration page

Flynns82

Member
Jun 23, 2016
16
0
36
i dont understand why i need to add a combobox, is not possible do this without $_POST? anyway i try but the combobox is empty
 

Kieran

Tag me
Contributor
Jan 1, 2016
459
286
122
i dont understand why i need to add a combobox, is not possible do this without $_POST? anyway i try but the combobox is empty
You need the combobox. What if there are 2 users with the same IP? For example because they are both in the same lan.
If it's empty then it couldn't find clients with the visitors IP. Are you connected to the TS server? I tried it before posting and it got my name.
 

Flynns82

Member
Jun 23, 2016
16
0
36
You need the combobox. What if there are 2 users with the same IP? For example because they are both in the same lan.
If it's empty then it couldn't find clients with the visitors IP. Are you connected to the TS server? I tried it before posting and it got my name.
Ahhhhhhhhh, okok right :D i understand now, anyway now i fix my code, i fail to add your code, and now there is my nickname on the combobox, the problem is that i receve an error on
PHP:
$client = $ts3->clientGetByName($_POST['client_nickname']);
error:
Code:
Fatal error: Uncaught TeamSpeak3_Adapter_ServerQuery_Exception: invalid clientID in /home/vol3_3/byethost7.com/b7_19970054/otakugamers.ga/htdocs/registrazione/libraries/TeamSpeak3/Node/Server.php:763 Stack trace: #0 /home/vol3_3/byethost7.com/b7_19970054/otakugamers.ga/htdocs/registrazione/register.php(45): TeamSpeak3_Node_Server->clientGetByName(NULL) #1 {main} thrown in /home/vol3_3/byethost7.com/b7_19970054/otakugamers.ga/htdocs/registrazione/libraries/TeamSpeak3/Node/Server.php on line 763
and i dont know why o.o
 

Kieran

Tag me
Contributor
Jan 1, 2016
459
286
122
Ahhhhhhhhh, okok right :D i understand now, anyway now i fix my code, i fail to add your code, and now there is my nickname on the combobox, the problem is that i receve an error on
PHP:
$client = $ts3->clientGetByName($_POST['client_nickname']);
error:
Code:
Fatal error: Uncaught TeamSpeak3_Adapter_ServerQuery_Exception: invalid clientID in /home/vol3_3/byethost7.com/b7_19970054/otakugamers.ga/htdocs/registrazione/libraries/TeamSpeak3/Node/Server.php:763 Stack trace: #0 /home/vol3_3/byethost7.com/b7_19970054/otakugamers.ga/htdocs/registrazione/register.php(45): TeamSpeak3_Node_Server->clientGetByName(NULL) #1 {main} thrown in /home/vol3_3/byethost7.com/b7_19970054/otakugamers.ga/htdocs/registrazione/libraries/TeamSpeak3/Node/Server.php on line 763
and i dont know why o.o
What is on line 40-50 in register.php? Would be nice to see because I don't know where the error could come from.
 

Flynns82

Member
Jun 23, 2016
16
0
36
What is on line 40-50 in register.php? Would be nice to see because I don't know where the error could come from.
this is the part of code:
PHP:
    if(!$error)
    {
        $client = $ts3->clientGetByName($_POST['client_nickname']); 
        $groupsArr = $client->memberOf();
                foreach ($groupsArr as $group)
                {
                    $groupsString = $groupsString . $group;
                }
                if (strstr($groupsString, 'Otaku Member') || strstr($groupsString, 'Apprendista Otaku'))
                {
                    $errormsg = "Sei Gia registrato!";
                    $error=true;
                }
    }
and the line 45 is :
Code:
$client = $ts3->clientGetByName($_POST['client_nickname']);
 

Kieran

Tag me
Contributor
Jan 1, 2016
459
286
122
Put
PHP:
echo '<pre>';print_r($client);echo '</pre>';
Try again and send me all the text that appears in a pastebin. I don't know why it says invalid client id.
If nothing appears look in your log for errors
 

Flynns82

Member
Jun 23, 2016
16
0
36
nothing appears, also in log, just say that error and
Code:
Notice: Undefined index: client_nickname
on the same line
EDIT: i think its like say DifferentUser, becuase on the combobox i see my nickname but, if after on these command it gives an error i think it is a problem on the $_POST, when i try to recall a variable on the combobox
 

Kieran

Tag me
Contributor
Jan 1, 2016
459
286
122
nothing appears, also in log, just say that error and
Code:
Notice: Undefined index: client_nickname
on the same line
EDIT: i think its like say DifferentUser, becuase on the combobox i see my nickname but, if after on these command it gives an error i think it is a problem on the $_POST, when i try to recall a variable on the combobox
Inside $_POST[''] has to be the name of the HTML Select Element
 

Flynns82

Member
Jun 23, 2016
16
0
36
i already check it but idk why it not work, anyway to be more facilitated now im posting the updated:
i know that the Xclient's part its the same thing of your line but i do it only to check but anyway nothing change..
i do not know, but it may not work because, the part under "// select nickname" is out of the "if (isset ($ _ POST ['signup']))" and it cant read the variable?i dont think but idk..
at this point I start thinking maybe I have something wrong but I think it's all right in the code (syntax, parenthesis etc ..)
EDIT: ehm.. before repost the php code on pastebin i had sorted and made order in the file and idk but now works haha.
now I go to step 2, I hope to succeed right now
 
Last edited:

Joxiii

Discord hater!
Feb 2, 2016
271
182
92
i already check it but idk why it not work, anyway to be more facilitated now im posting the updated:
i know that the Xclient's part its the same thing of your line but i do it only to check but anyway nothing change..
i do not know, but it may not work because, the part under "// select nickname" is out of the "if (isset ($ _ POST ['signup']))" and it cant read the variable?i dont think but idk..
at this point I start thinking maybe I have something wrong but I think it's all right in the code (syntax, parenthesis etc ..)
EDIT: ehm.. before repost the php code on pastebin i had sorted and made order in the file and idk but now works haha.
now I go to step 2, I hope to succeed right now
Can you please Upload the full script?
 
Top