You need the combobox. What if there are 2 users with the same IP? For example because they are both in the same lan.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
Ahhhhhhhhh, okok right 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 onYou 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.
$client = $ts3->clientGetByName($_POST['client_nickname']);
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
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.Ahhhhhhhhh, okok right 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
error:PHP:$client = $ts3->clientGetByName($_POST['client_nickname']);
and i dont know why o.oCode: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
this is the part of code: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.
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;
}
}
$client = $ts3->clientGetByName($_POST['client_nickname']);
Notice: Undefined index: client_nickname
Inside $_POST[''] has to be the name of the HTML Select Elementnothing appears, also in log, just say that error andon the same lineCode:Notice: Undefined index: client_nickname
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
Can you please Upload the full script?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