I think you have missunderstood me (?)
That I did know. But I want the existing sql-query there AND add so it inserts into the other table too. In other words I want to insert into two tables at the same time. How do I do this?
currently code for just to insert in table user
function addUser($uid, $pwd, $picurl, $sex, $com, $kat, $self, $datecreated)
{
$sql = "insert into user (uid, pwd, picurl, sex, com, kat, selfvote, datecreated) values ('" . AddSlashes($uid) . "','" .
AddSlashes($pwd) . "','" . AddSlashes($picurl) . "','" . $sex . "','" . $com . "','" . $kat . "'," . $self . ", now())";
$connection = mysql_pconnect(SQL_SERVER, SQL_UID, SQL_PWD);
mysql_select_db(SQL_DB, $connection);
mysql_query($sql);
$sql = "select * from user where uid='" . AddSlashes($uid) . "' and pwd='" . AddSlashes($pwd) . "'";
$query = mysql_query($sql);
$rows = mysql_num_rows($query);
if ($rows > 0)
{
$record = mysql_fetch_array($query);
return $record["id"];
}
How do i change the code so it still inserts data into table user but ALSO into table phpbb_users ???