I have been coding a dumb bridge between Ivisionboard and Teamspeak using a reg script to pull the password from the custom priviate feild and inserting it and the members name and inserting it into teamspeak's mysql database, i have come up with the following but when it runs all i get in the feild Resource id #2 for username and for password i get Resource id #3, lol its probably somat simple but i am stuck.
<?php
//Database Information
$dbhost = "My_database";
$dbname = "My_database";
$dbuser = "My_database";
$dbpass = "My_database";
//Connect to database
mysql_connect ( $dbhost, $dbuser, $dbpass)or die("Could not connect: ".mysql_error());
mysql_select_db($dbname) or die(mysql_error());
//Get the data for teamspeak from the IBF Database and the Custom Fields
$s_client_name = mysql_query("SELECT name FROM ibf_members");
$s_client_password = mysql_query("SELECT field_4 FROM ibf_pfields_content");
//Tell me whats going on so it can be logged (Also to see who is being inserted)
echo "$s_client_name Pulled <B>OK..</B><br />";
//Once pulled insert into the database for teamspeak
$query = "INSERT INTO ts2_clients (s_client_name, s_client_password, i_client_server_id, b_client_privilege_serveradmin)
VALUES('$s_client_name', '$s_client_password', '0', '0')";
//Again tell me whats going on for the finishing result
echo "Insterted both $s_client_name and there password into Teamspeak Data base<br />";
//Finish off the connection and kill any open connections
mysql_query($query) or die(mysql_error());
mysql_close();
?>
Thanks all