Hi-
Very new to PHP and MySQL outputs. Working hard on learning and have run into an ever dreaded error. The process is more "advanced" for what I am used to working with.
Basically I have a page that outputs data from a table, it has a link which attaches the gegevenID to it and when I click the link it is supposed to launch new page and take me to see all of the data for that row entry (based on gegevenID).
**Note: I'm not 100% sure about the WHERE statement
on my vlucht.php page, which is giving me said message, I have the following code:
<html>
<head><META http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>Vlucht Gegevens</title></head>
<body>
<?php
//MySQL Database Connect
include 'datalogin.php';
// Define your colors for the alternating rows
$color1 = "#F0F8FF";
$color2 = "#FFFFFF";
$row_count = 0;
mysql_query("SET CHARACTER SET 'utf8';");//GET and POST
mysql_query("SET NAMES 'utf8';");//POST
$result = mysql_query("select vg.gegevenID, vg.vertrektijd, lh.luchthavencode, lh2.luchthavencode AS aankomstluchthaven, vg.vertrekdatum, vg.vertrekluchthaven, lvm.luchtvaartmaatschappij, t.toestel, vg.inschrijvingnmr
from tbl_vluchtgegevens vg
WHERE gegevenID = " . $_Get['id']"
left join tbl_luchthaven lh
on vg.vertrekluchthaven = lh.luchthavenID
left join tbl_luchthaven lh2
on vg.aankomstluchthaven = lh2.luchthavenID
left join tbl_toestel t
on vg.toestel = t.toestelID
left join tbl_luchtvaartmaatschappij lvm
on vg.luchtvaartmaatschappij = lvm.luchtvaartmaatschappijID
ORDER BY vg.vertrekdatum DESC");
echo "<table border='0' cellspacing='0'>
<tr>
<th width='20' valign='top'><div align='left'> </div></th>
<th width='45' valign='top'><div align='left'>ID</div></th>
<th width='100' valign='top'><div align='left'>Vertrekdatum</div></th>
<th width='100' valign='top'><div align='left'>Vertrektijd</div></th>
<th width='100' valign='top'><div align='left'>Van</div></th>
<th width='100' valign='top'><div align='left'>Naar</div></th>
<th width='100' valign='top'><div align='left'>Luchtvaartmaatschappij</div></th>
<th width='100' valign='top'><div align='left'>Toestel</div></th>
<th width='100' valign='top'><div align='left'>Inschrijvingnummer</div></th>
</tr>
<tr>
<th height='1' colspan='9' valign='top' bgcolor='#333333'></th>
</tr>";
while($row = mysql_fetch_array($result))
{
$row_color = ($row_count % 2) ? $color1 : $color2;
echo "<tr>";
echo "<td bgcolor='$row_color'> </td>";
echo "<td bgcolor='$row_color'>" . '<a href="/vluchtgegevens/vlucht.php?id=' . $row['gegevenID'] . '">' . $row['gegevenID'] . '</a>' . "</td>";
echo "<td bgcolor='$row_color'>" . $row['vertrekdatum'] . "</td>";
echo "<td bgcolor='$row_color'>" . $row['vertrektijd'] . "</td>";
echo "<td bgcolor='$row_color'>" . $row['luchthavencode'] . "</td>";
echo "<td bgcolor='$row_color'>" . $row['aankomstluchthaven'] . "</td>";
echo "<td bgcolor='$row_color'>" . $row['luchtvaartmaatschappij'] . "</td>";
echo "<td bgcolor='$row_color'>" . $row['toestel'] . "</td>";
echo "<td bgcolor='$row_color'>" . $row['inschrijvingnmr'] . "</td>";
echo "</tr>";
// Add 1 to the row count
$row_count++;
}
echo "</table>";
?>
</body>
</html>
I would appreciate any thoughts on this. Thanks in advance.