Forum Moderators: coopster
i have to start the(a) session on the iframe page to set the session variable correct?
Correct. Anywhere you want to set session variables you must start a session first.
is there a way to add to the current open session with another page?
I suppose you could use javascript to write HTML <form> variables back and forth in the frames and then handle the data server-side from one form's action or the other.
also SELECT LAST_INSERT_ID() AS lastID; im running from the page that is saving(setting) last. is this the correct placement for this function or is it supposed to be on the page that performs the insert like mysql_insert_id?
The script that performs the INSERT is the connection that should handle the LAST_INSERT_ID(). It is a per-connection feature.
am i supposed to run query's on this statement like any other select statement i use?
$Query = "SELECT LAST_INSERT_ID() AS lastID";
$Result = mysql_query($Query, $Link);
is there anything else i have to do with it to get it to work?
You've got it. Or, if you are going to use it in an INSERT or UPDATE statement, you don't even have to select it first, you can simply use it...
INSERT INTO mytable (my_foreign_key) VALUES(LAST_INSERT_ID());