<?php include('../db/connect.php');
foreach($_REQUEST as $key=>$value) {
$$key=$value;
} ?>
<? $sql = "SELECT * from databasename WHERE photostat='1' order by photoid desc";
$result = @mysql_query($sql, $connection) or die(mysql_error());
while ($row = mysql_fetch_array($result)) {
$photoid = $row['photoid'];
$photocase = $row['photocase'];
$photoname = $row['photoname'];
$photofolder = $row['photofolder'];
$photocaption = $row['photocaption'];
$photostat = $row['photostat']; ?>
<a href="displayphoto.php?photoid=<?=$photoid?>"><img src="<?=$photofolder?>/<?=$photoname?>" width="150" border="2"></a> <? };
?>
This was a very rudimentary photo album that I wrote years ago. The newest PHP 7.0 broke the code.
I am retired and no longer programming, but want to get this working again. Any suggestions?