Undefined index error in PHP

Posts
2
Registration date
Wednesday April 11, 2018
Last seen
April 11, 2018
-
Hello
May someone have time for this
I have a error in the following code
It's undefined index error
Please help me

<?php 
error_reporting(); 

include('load/session.php'); 
include('connection.php'); 
include('header.php');?> 
<div> 
<table> 
<tr> 
<td> <?php echo $travel_details=$_POST['travel_id']; ?> </td> 
<td> <?php echo $bus_id = $_POST['bus_id']; ?> </td> 
<td> <?php echo $dates = $_POST['fdate']; ?> </td> 
<td> <?php echo $route_id = $_POST['route_id'];?> </td> 
<td> <?php echo $adult = $_POST['person']; ?> </td> 
<td> <?php echo $seniur = $_POST['seniur']; ?> </td> 
<td> <?php echo $child = $_POST['Child']; ?> </td> 
<td> <?php echo $price = $_POST['price']; ?> </td> 

</tr> 
</div> 
<?php 
//echo $traveler; 

$seats = ""; 
$sql = mysql_query("SELECT seats FROM `reserve_bus` where `travel_date` = '$dates' AND `bus_id` = '$bus_id' AND route_id = '$route_id'") or die("error". mysql_error()); 

while($info = mysql_fetch_array($sql)) 
{ 
$seats = $seats.$info['seats'].","; 
} 

$bus_type = mysql_fetch_array(mysql_query("SELECT * FROM bus_details WHERE bus_id = '$bus_id'")); 
$bustype = $bus_type['bus_type']; 
if($bustype=='acsleep' || $bustype=='nonacsleep'){ include('bus/sleeping.php'); } 
elseif($bustype== 'acshitsleep'|| $bustype== 'nonacshitsleep' ){ include('bus/shittingsleep.php'); } 
elseif($bustype== 'acshite' || $bustype== 'nonacshit'){ include('bus/shittingseats.php'); } 



include('footer.php'); 
?>


Thanks
See more 

Your reply

1 reply

Posts
14289
Registration date
Monday July 11, 2005
Status
Moderator
Last seen
December 14, 2018
0
Thank you
Hello,

What is the complete message ? You should have a line in the log
Respond to BunoCS