Hi how can I insert the same ID as the account being created with this statement into a table which is called layouts using this mysql statement?
$q = $dbc -> prepare("INSERT INTO accounts (email, password, salt, username, gender, loginIP, shrapnel, joined) VALUES (?, ?, ?, ?, ?, ?, ?, ?)");
$q -> execute(array($_POST['email'], hash('sha512', 'jooosjdsakjdsn' . $_POST['password'] . md5($random)), md5($random), $_POST['username'], $_POST['gender'], $_SERVER['REMOTE_ADDR'], $random, date('Y-m-d : H:i:s')));
Is it possible with a join? The ID is an auto increment field in the table accounts.
You could try using
LAST_INSERT_ID()in another query immediately afterwards.