2

This undefined index error pops every time:

Notice: Undefined index: vehicle_id in
C:\xampp\htdocs\TaxiLocator\php\retrive.php on line 39

Notice: Undefined index: model in
C:\xampp\htdocs\TaxiLocator\php\retrive.php on line 42

But only two of the variables are unidentified; the other two variables are displayed on the table.

Is there something wrong with my MySQL db?

php code

<?php
while($vehicle_table=mysql_fetch_assoc($records)){
    echo "<tr>";
    echo "<td>".$vehicle_table['vehicle_id']."</td>";
    echo "<td>".$vehicle_table['latitude']."</td>";
    echo "<td>".$vehicle_table['longtitude']."</td>";
    echo "<td>".$vehicle_table['model']."</td>";
    echo "</tr>";
}
?>

vehicle_id is declared as an int type, while latitude, longitude, and vehicle_id are declared as double, and model is declared as varchar.

Can anyone help?

Drenmi
  • 8,492
  • 4
  • 42
  • 51
nadun
  • 393
  • 1
  • 4
  • 14

0 Answers0