PHP - How to retrieve session in php

Posted by Klaus Jasper on Stack Overflow See other posts from Stack Overflow or by Klaus Jasper
Published on 2013-07-03T05:03:08Z Indexed on 2013/07/03 5:05 UTC
Read the original article Hit count: 185

Filed under:
|
|
|

I created a table that contains id - names - jobs and page that shows the names only and beside each name there is button Job and session that contains the id. this is my code

$query = mysql_query("SELECT * FROM table");
while($fetch = mysql_fetch_array("$query")){
$name = $fetch['names'];
$id = $fetch['id'];
echo '</br>';
echo $name;
$_SESSION['name'] = $id;
echo "<button>Job</button>";
}

I want when the user click on button Job redirect to a page that contains the job of that session. so how can I do it?

© Stack Overflow or respective owner

Related posts about php

Related posts about mysql