I get no errors but no table is displayed, I know its not on prepared statements but there is no interaction its just a display so there is no chance of SQL injection
what Am I missing
Hello I have edited the long version
<?php
echo "<table border='10' style='border-collapse: collapse;border-color: #0099FF;'>";
echo "<tr style='font-weight: bold;'>";
echo "<td width='200' align='center'>NAme</td><td width='200' align='center'>Headhot</td><td width='200' align='center'>Date</td><td width='200' align='center'>Age</td>";
echo "</tr>";
include("dbopent.php");
$result = mysql_query("
SELECT N, Limg, Lpage, F, Age
FROM (
SELECT N, Limg, Lpage, F, Age
FROM (
SELECT N, Limg, Lpage, F, CURDATE( ) , (
YEAR( CURDATE( ) ) - YEAR( F )
) - ( RIGHT( CURDATE( ) , 5 ) < RIGHT( F, 5 ) ) AS Age
FROM ACT)alias
WHERE Age BETWEEN 30 AND 39)ALIAS
");
while($row=mysql_fetch_array($result))
$color="1";
{
if($color==1){
echo "<tr bgcolor='#000000'>";
echo "<td align='center' width='10'>" . $row['N'] . "</td>";
echo "<td align='center' width='10'>" . "<a href=\"{$row['Lpage']}\"><img src=\"{$row['Limg']}\">" . "</td>";
echo "<td align='center' width='10'>" . $row['F'] . "</td>";
echo "<td align='center' width='10'>" . $row['Age'] . "</td>";
echo "</tr>";
}
else {
echo "<tr bgcolor='#FFFFFF'>";
echo "<td align='center' width='10'>" . $row['N'] . "</td>";
echo "<td align='center' width='10'>" . "<a href=\"{$row['Lpage']}\"><img src=\"{$row['Limg']}\">" . "</td>";
echo "<td align='center' width='10'>" . $row['F'] . "</td>";
echo "<td align='center' width='10'>" . $row['Age'] . "</td>";
echo "</tr>";
$color="1";
}
}
echo '</table>';
?>