If you are using DataAssist for the insert, then the ID is automatically stored in the session for you with the name specified in the insert interface.
If you are using the standard DW insert, then you can apply the "Set session value" server behavior and set a session variable to the value: <?php ecno(mysql_insert_id()) ?>
The tricky part here would be that you would have to move the set session value code below the insert code, and couldn't use the insert redirect to redirect since it would leave the page before the session variable was set, so you would probably have to hand-code a redirect. Really the best way is to use DataAssist and the session variable will already be set for you.