I have the following elseif structure implemented. It is currently using the query from the first option (that is, displaying all records where category='benjamin'), regardless of which category is actually being passed via the url. Changing the order of the options always results in the display of whatever is first in the script, again regardless of what category is passed via the url.
I'm sure my error here is simple. Just can't find it yet.
Appreciate any suggestions.
Thanks
David
<?php
if ($submenu="benjamin")
$sql = "SELECT url, caption, date FROM photos WHERE category='benjamin' ORDER BY date ASC ";
elseif ($submenu="sailboarding")
$sql = "SELECT url, caption, date FROM photos WHERE category='sailboarding' ORDER BY date ASC ";
elseif ($submenu="other")
$sql = "SELECT url, caption, date FROM photos WHERE category='other' ORDER BY date ASC ";
?>