jbert Posted February 7, 2008 Share Posted February 7, 2008 I am very inexperienced with PHP, and I cannot seem to figure out how to post a session value into a field. I have created a new record and posted a JobID into a new record, but I also need to insert an ID (session value) into a field in the same record. My code is as follows: <?php session_start(); $New_Request_add = clone($Posting); $New_Request_add->layout = 'Transfer Requests'; $New_Request_fields = array('JobID'=>$_POST['JobID']); foreach($New_Request_fields as $key=>$value) { $New_Request_add->AddDBParam($key,$value); } $New_Request_result = $New_Request_add->FMNew(); if(is_a($New_Request_result,"FX_Error") || $New_Request_result['errorCode'] != "0") fmsTrapError($New_Request_result,"error.php"); $New_Request_row = current($New_Request_result['data']); $New_Request_row_key = key($New_Request_result['data']); Quote Link to comment https://forums.phpfreaks.com/topic/89979-session-variables/ Share on other sites More sharing options...
revraz Posted February 7, 2008 Share Posted February 7, 2008 Its stored just like you set it, in $_SESSION['yourfieldname'] So where did you store it? Quote Link to comment https://forums.phpfreaks.com/topic/89979-session-variables/#findComment-461325 Share on other sites More sharing options...
phpSensei Posted February 7, 2008 Share Posted February 7, 2008 session_start(); $name = "Sensei"; $_SESSION['name'] = $name; echo $_SESSION['name']; Quote Link to comment https://forums.phpfreaks.com/topic/89979-session-variables/#findComment-461326 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.