In one table, I bring the user:

$db = mysql_connect("localhost","root","vladon12"); mysql_select_db("testgame"); $result = mysql_query ("INSERT INTO `users` (name,password,email,date,ip) values('$name','$password','$email','$date','$ip')") or die(mysql_error()); 

And in the other - the "Hero", which he chose. Is it possible to do so?

  $db2 = mysql_connect("localhost","root","vladon12"); mysql_select_db("testgame"); $result2 = mysql_query ("INSERT INTO `startpoke` (name....) values('$name'........)") or die(mysql_error()); 

    1 answer 1

    Reconnecting to the database is not necessary, just:

      $ db = mysql_connect ("localhost", "root", "vladon12"); 
         mysql_select_db ("testgame"); 
         mysql_query ("INSERT INTO users (name, password, email, date, ip) values ​​('$ name', '$ password', '$ email', '$ date', '$ ip')" or die (mysql_error ());
         mysql_query ("INSERT INTO startpoke (name ....) values ​​('$ name' ........)") or die (mysql_error ()); 

    • oh =) thanks =) - k0mar