Código MySQL:
Ver original
$mysqli=new mysqli($hostname_conn,$username_conn,$password_conn,$database_conn); $mysqli->query("INSERT INTO users (login, fname, ls, name, mac, created, end_date, addby, status, reseller_id, stb_type) VALUES ('".$name."', '".$_SESSION["loginuser"]."', '".$name."', '".$displayname."', '".normalizeMac($_POST['stb_mac'])."', 'NOW()', '".date("Y-m-d H:i:s", $run_end)."', '".$_SESSION["id"]."', '0', '0', '')"); $insert_id = $mysqli->insert_id;
pero si no pongo el ID de la tabla como AUTO_INCREMENT no inserta el ID