I want to use session variable in another page. I used data which is got from database to store in variable. When I try to use it another page error god undefined index. Code is below. help me to solve this
<?php
session_start();
require('dbconnection.php');
$output='';
$sql="select * from vacancy";
$res=mysqli_query($conn,$sql);
if(mysqli_num_rows($res)>0){
while($row=mysqli_fetch_assoc($res)){
$imageno=$_SESSION[$row['vacancyid']];
?>
other.php page
<?php
session_start();
?>
<div>
<?php
$src='images/vacancy/'.$_SESSION["imageno"].'.jpg';
echo "<img src='".$src."'>";
?>
</div>
$imagenoin session variable!!