Adding session_commit didn't work.
I added the other code and when I loaded the page I got this at the bottom of the page
array(8) {
["loginlog_ID"]=>
&int(2397)
["EmpID"]=>
&string(2) "27"
["LoginLevel"]=>
&string(5) "admin"
["LoginGroup"]=>
&string(5) "admin"
["LoginName"]=>
&string(8) "Georgina"
["LoginFullName"]=>
&string(16) "Georgina Barrett"
["WADbSearch1_CustomerDetails_Results"]=>
&string(31) " AND (Surname LIKE '%barrett%')"
["WADA_Insert_BookingRequest"]=>
&int(0)
}
When I submitted the form it went to the detail page as before but didn't pass the session variable.