Heliguy Posted August 5, 2012 Report Posted August 5, 2012 Hi Guys, I'm trying to code a form that enables pilots to enter in a nickname of their choice and click connect and then it logs them into the server with that nickname but i already have this working.The bit I would like to do is that once the pilot is logged in to phpVMS. When he uses the form to login to the TeamSpeak server his username is already there in the nickname box in a defined pattern. I would like the value box on the form to be able to pull the firstname lastname and pilot id, For example Michael Atherton JCA001. I have tried this code <center>Pilot Name - Pilot ID<br> <input type="text" name="NICKNAME" value="<?php echo PilotData::getProperPilotID($pilotid) ;?>" /></center> but it dosnt fetch the Pilot ID. Any help is much appreciated. Sorry for my grammar it is 20 past 3 . Regards Michael Quote
Sava Posted August 6, 2012 Report Posted August 6, 2012 To get the full ICAO+Pilot ID <?php echo PilotData::GetPilotCode(Auth::$userinfo->code, Auth::$userinfo->pilotid) ?> echo $pilotcode won't work. Quote
Heliguy Posted August 6, 2012 Author Report Posted August 6, 2012 Thanks guys, I will try those. Quote
Heliguy Posted August 6, 2012 Author Report Posted August 6, 2012 Hi Guys, Thanks for all your help, I have now completed my box. Here is the code if anybody would like to use it in there own projects . Replace ts.server.co.uk with your own ip. <form name="tsform"> <input type="hidden" name="NICKNAME" value="<?php echo Auth::$userinfo->firstname.' '.Auth::$userinfo->lastname; ?> - <?php echo PilotData::GetPilotCode(Auth::$userinfo->code, Auth::$userinfo->pilotid) ?>" /> <br> <center><input type="button" value="Connect" onclick="javascript:location.href='ts3server://ts.server.co.uk/?port=9987&nickname=' + tsform.NICKNAME.value"></center> </form> 1 Quote
simonecatalano Posted January 31, 2014 Report Posted January 31, 2014 Ok, It's good , but How insert password ??? Quote
StartVM Posted January 31, 2014 Report Posted January 31, 2014 Nice work Heliguy! It is people like you that start to bring this forum back to what it should be. Unfortunately, there are always "some" people that need to bring it one step back but I will try not to focus on the negative. Great work! Quote
Tom Posted February 1, 2014 Report Posted February 1, 2014 06 August 2012 Just... I... Anyway, Simone you can add a server password like so: <a href="ts3server://ts.server.co.uk/?port=9987&nickname=<?php echo Auth::$userinfo->firstname.' '.Auth::$userinfo->lastname; ?>&password=MyServerPassword">Connect to Teamspeak</a> Quote
simonecatalano Posted February 4, 2014 Report Posted February 4, 2014 It's Possible when enter in the ts automatically issued an Server Groups ? THanks Quote
atulumello Posted July 14, 2014 Report Posted July 14, 2014 So... just in case anyone wants to add this as a link instead of through a form... replace your ts server info below. <a href="ts3server://ts.flyporterva.com/?port=9988&nickname= <?php echo PilotData::GetPilotCode(Auth::$userinfo->code, Auth::$userinfo->pilotid) ?> <? php echo Auth::$userinfo->firstname.' '.Auth::$userinfo->lastname; ?>" My Teamspeak Server</a> Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.