Undefined index error php in the following code [Closed]

haqyar572 2 Posts Wednesday April 11, 2018Registration date April 11, 2018 Last seen - Apr 11, 2018 at 04:19 AM - Latest reply: Ambucias 51158 Posts Monday February 1, 2010Registration dateModeratorStatus April 23, 2018 Last seen
- Apr 11, 2018 at 04:50 AM
<?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');
?>
See more 

1 reply

Ambucias 51158 Posts Monday February 1, 2010Registration dateModeratorStatus April 23, 2018 Last seen - Apr 11, 2018 at 04:50 AM
0
Helpful
Greetings,

Please, bare in mind that CCM.net is a mutual aid community, all answers on the forum are provided by volunteers who give their time free to help solve issues.

Hence we request that CCM forum users show mutual respect. Therefore, when asking for assistance, please be courteous, as for elsewhere in similar circumstances in every day society when asking for help. (Usually, how would someone ask for help? i.e. please, thank you, appreciate, grateful, etc.)

Being courteous will increase your chances of getting the help you need.

http://ccm.net/contents/948-terms-of-use-for-ccm-respect-for-others

Please, copy, modify and repost your message respecting the politeness charter.

We trust that you understand.

Moderator