Registration problem. Unity don't want to write in data base

Hi,
Can anyone help me?
I am trying to write in data base with unity… it seems that Unity give the command to PHP but Php has some problems… can you help me? What am I doing wrong? :expressionless:

Here is the php code :

<?php $username = $_REQUEST['username']; $password = $_REQUEST['password']; $email = $_REQUEST['email']; $host = 'mysql.hostinger.ro'; $user = 'u404069052_card'; $dbpassword = '********'; $db = 'u404069052_card'; $table = 'users'; mysqli_connect($host, $user, $dbpassword) or die(mysql_error()); mysqli_select_db($db); $password = md5($password); mysqli_query("INSERT INTO `users` VALUES ('NULL', '{$username}', '{$password}', '{$email}')") or die (mysql_error()); $findid = mysqli_query("SELECT * FROM `users` WHERE `username`='".$username."'" ) or die (mysql_error()); $numrows = mysqli_num_rows($findid); $message = ""; if ($numrows == 0) { die (" the new user not found \n"); } else { while($row = mysql_fetch_assoc($findid)) { $userid = $row['id'] ; break; } $startingcollectioncards = array(0,0,1,1,2,3,3,4,5,6,0,1,2,3,4,5,6,7,8,9,10,10,11,11,11); foreach ($startingcollectioncards as $card) { mysql_query("INSERT INTO `player_collections` VALUES ('NULL', '{$userid}', '{$card}')") or die (mysql_error()); } $startingdeckcards = array(0,1,2,3,4,5,6,7,8,9,10,0,1,2,3,4,5,6,7,8,9,10,11); foreach ($startingdeckcards as $card) { mysql_query("INSERT INTO `player_decks` VALUES ('NULL', '{$userid}', '{$card}')") or die (mysql_error()); } $query = "INSERT INTO silver VALUES('NULL', '{$userid}', '150')"; $result = mysql_query($query) or die('Query failed: ' . mysql_error()); echo "done, userid:".$userid.""; } ?>

and the registration php file is on http://collegemate.ro/registration.php
Same thing that I see in browser, I see in Unity…: Warning: mysqli_select_db() expects exactly 2 parameters, 1 given in /home/u404069052/public_html/registration.php on line 14

Warning: mysqli_query() expects at least 2 parameters, 1 given in /home/u404069052/public_html/registration.php on line 17
Thanks
Mihai

Never mind, I found the mysql conversion tool and converted from mysql to msqli.
Thanks