# MySql to session variable

**URL:** <https://www.phphelp.com/t/mysql-to-session-variable/10564>\
**Category:** MySQL database\
**Created:** [November 17, 2007, 5:39pm UTC](https://www.phphelp.com/t/mysql-to-session-variable/10564 "2007-11-17T17:39:08Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![JAKellum](https://www.phphelp.com/letter_avatar_proxy/v4/letter/j/82dd89/32.png) [@JAKellum](https://www.phphelp.com/u/JAKellum)\
**Post date:** [November 17, 2007, 5:39pm UTC](https://www.phphelp.com/t/mysql-to-session-variable/10564/1 "2007-11-17T17:39:08Z")

</div>

Scenario: I have just written a record to MySQL. using PHP  
Field…Type… Null   
Index… int(3)… No auto\_increment  
HName…varchar(30)… No { and so on }

I need to save the Index value as a session variable… may be a JavaScript?

Help I don’t have a clue??
