ARTICLE AD BOX
My gallery work on the old server but when I moved to an another that has updated PHP and MySql the gallery stop to work and show no pictures. I was told that it is because of php. file has error.
Why the gallery with the same code was working fine on the old server?
How to get rid of warning to be able to see pictures on the new server?
<?php $count; $p = $_GET['p']; switch ($p) { case 1: echo("<image id='pic' src='fl1.jpg' /><br/><span id='count' align='center'>1</span>"); break; case 2: echo("<image id='pic' src='fl2.jpg'/><br/><span id='count'>2</span>"); break; case 3: echo("<image id='pic' src='fl3.jpg'/><br/><span id='count'>3</span>"); break; case 4: echo("<image id='pic' src='fl4.jpg'/><br/><span id='count'>4</span>"); break; case 5: echo("<image id='pic' src='fl5.jpg'/><br/><span id='count'>5</span>"); break; default: echo("No Suggestions.<br/><span id='count'>-1</span>"); break; } ?>Error log as below:
15-Feb-2026 03:34:16 America/Boise] PHP Warning: Undefined array key "p" in /home//public_html/galleries/f/gallery.php on line 4
