php mysqli_insert_id($link) convert/retain

eltom

New Member
Hi i have a form (X) that inserts data into a mysql table (A) and than redirects to another form (Y) which will insert data into another table (B) but i need to use tables A's last inserted row. I know i can get it from using the \[code\]mysqli_insert_id\[/code\] function but when i submit to form Y and re show form Y is messes up because the \[code\]$ID\[/code\] value is nulled. i tried to type cast the value of id by doing this.\[code\]$id = (int)mysqli_insert_id($link);\[/code\]but that didn't help at all.
 
Back
Top