PHP - How to retrieve session in php
- by Klaus Jasper
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?