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']); 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? 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']; Link to comment https://forums.phpfreaks.com/topic/89979-session-variables/#findComment-461326 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.