Joke Database
< ?php
$jokecount = "SELECT COUNT(`ID`) FROM `jokes` WHERE Title != ''";
$thecount = mysql_query($jokecount);
$totjokes = mysql_result($thecount,0,0);
echo "Welcome to the jokes section. There are $totjokes jokes available. Please select a category.
- “;
- ” . $row{’Category’} . “ “;
$getcats = “SELECT DISTINCT Category FROM jokes ORDER BY Category”;
$thecats = mysql_query($getcats);
while ($row = mysql_fetch_array($thecats,MYSQL_ASSOC)) {
if ($row{’Category’}!=”OneLiner”) {
echo “
}
}
?>
Jokes in association with Le Tour des Promos


