Reputation: 332
I need to know if there is a way where I can put the id(div id) into a session variable.
My code goes something like this
<div class='fieldRow'>Options </div>
<div id="abcde"></div>
<div class='Row'>
<?php
$user_types->display();
echo '<hr/>';
?>
<!--<hr/>-->
</div>
I want to retrieve the value abcde in a session variable. Thanks for your help and time in advance
Upvotes: 0
Views: 831
Reputation: 74076
Why not just create the ID inside PHP? Something like this:
<?php
session_start();
$id = /* some code to create the id */ 'abcde';
$_SESSION['id'] = $id;
?>
<div class='fieldRow'>Options </div>
<div id="<?php echp $id; ?>"></div>
<div class='Row'>
<?php
$user_types->display();
echo '<hr/>';
?>
<!--<hr/>-->
</div>
Upvotes: 1