Code:
@$register = odbc_exec($connect, "INSERT INTO TB_User(StrUserID, password, Name, Email, sex, certificate_num, reg_ip, sec_primary, sec_content) VALUES ('".$user."', '".md5($password)."', '".$name."', '".$email."', '".$sex."', '".$SPass."', '".$ip."', '3', '3')");
if ($register) {
$find = odbc_fetch_array(odbc_exec($connect, "SELECT * FROM TB_User WHERE StrUserID = '".$user."'"));
$gift = $find["JID"];
odbc_exec($connect, "INSERT INTO SK_Silk(JID, silk_own) VALUES (".$gift.", ".$silk.")");
you can try and convert this to sqldrv, is working perfect on my reg page, but is odbc
$register = write the account info into account table
$find = finds all the data of the newly created account
$gift = filter the data to get only the JID of the newly create account
and last part writes into account table the newly created account JID and silk
its working, you need to convert it to sqldrv/mssql