Hi,
The code below was created to display job posts by country ID. It works, but I have to repeat the code for every ID. Is there a way to do this and not depend upon the ID...for example if more country IDs are added the code would not have to be changed?
<?
$sql="SELECT * FROM $table_name WHERE ID = '1'";
$result=@($sql,$connection);
$num=mysql_numrows($result);
$i=0;
while($i<$num) {
echo "<p class=\"body\"><strong>";
echo mysql_result($result,$i,"Continent");
echo "</strong><br>";
echo "<em>";
echo mysql_result($result,$i,"JobTitle");
echo " - ";
echo mysql_result($result,$i,"JobNm");
echo "<br>";
echo mysql_result($result,$i,"Country");
echo "</em><br>";
echo mysql_result($result,$i,"JobDesc");
echo "<br>";
echo "<strong>Job Experience:</strong> ";
echo mysql_result($result,$i,"JobExperience");
echo "<br>";
echo "<strong>Overseas Experience:</strong> ";
echo mysql_result($result,$i,"OverseasExperience");
echo "<br>";
echo "<strong>Posted:</strong> <em>";
echo mysql_result($result,$i,"PostDate");
echo "</em><br>";
echo "<strong>Please respond via email: <a href=\"mailto:jobs@tlmint.org?subject=";
echo mysql_result($result,$i,"JobNm");
echo "\"/>";
echo "jobs@tlmint.org";
echo "</a>";
echo "</p>";
$i++;
}
?>
Repeat for every ID 🙁
Thanks,
Sean