I have managed to get previous and next links working on my photo gallery but need to tidy it up.
My link works when coded like this
<?
echo "<a href='" . $PHP_SELF . "?photo_id=$prev'>Previous</a>"
?>
But when I do this I get various errors. Obviously my syntax is wrong
<?
if ($prev > 0){
echo
"<a href='" . $PHP_SELF . "?photo_id=$prev'>Previous</a>"
}
?>
Can someone help please?