Topic: Trying to inject accounts from a website into punbb. Howto?
I tried the following. When a user registers at out website i wanted that the registered information got also injected into the punbb database so that the user didn't have to register seperately later on the forums. But this didn't work, no user got added to the user table and neither was i able to login after registration. What am i doing wrong?
here's the code:
$group_id = "4";
$user_regdate = strtotime ("now"); // Unix Timestamp
$user_password=pun_hash($user->Password);
$username=$user->Username;
$user_email=$user->EmailAddress;
$user_lang = "english";
$user_timezone = "0";
$query_ft = "INSERT INTO punbb_users (group_id, registered, username, password, email, language, timezone) values ('$group_id','$user_regdate','$username','$user_password','$user_email','$user_lang','$user_timezone')";
mysql_query($query_ft, $conn) or die (mysql_error());