Jump to content

TeamSpeak Connect Box with firstname lastname pilotid as value


Heliguy

Recommended Posts

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

Link to comment
Share on other sites

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>

  • Like 1
Link to comment
Share on other sites

  • 1 year later...
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>

Link to comment
Share on other sites

  • 5 months later...

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>

Link to comment
Share on other sites

  • 1 month later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...