# Passing recordset content to Session Variable

**URL:** <https://forum.kirupa.com/t/passing-recordset-content-to-session-variable/295194>\
**Category:** Uncategorized\
**Created:** [August 26, 2009, 2:16pm UTC](https://forum.kirupa.com/t/passing-recordset-content-to-session-variable/295194 "2009-08-26T14:16:53Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![austinkyo](https://avatars.discourse-cdn.com/v4/letter/a/49beb7/32.png) [@austinkyo](https://forum.kirupa.com/u/austinkyo)\
**Post date:** [August 26, 2009, 2:16pm UTC](https://forum.kirupa.com/t/passing-recordset-content-to-session-variable/295194/1 "2009-08-26T14:16:53Z")

</div>

hi Guys,  
Can any one tell me the correct way to pass recordset content to Session Variable? i have been try for many times,but still cannnot get it. Here is my script:

\<?php  
if (!session\_id()) session\_start();  
$\_SESSION[‘Var’] = $row\_Var\_RS[‘Var\_ID’]?\>

Thanks
