The problem is that it doesn't work correctly, as you can see in the comment below if you send in the URL ?a=1?b=1 it passes into case 1 but the next case returns EB or the default case rather than case 1 again. I have tried ( case "1" ) as well
Code: Select all
$inum = $_REQUEST["a"];
$idisp = $_REQUEST["b"];
// inum = image number
// idisp = Display Type
// Type 1 - Echoes IMG Tag
// Type 2 - Echoes Image URL
// Wrong Image Number echoes EA
// Wrong Image Type echoes EB
$image0 = "/images/testimage.png";
switch($inum)
{
case 1:
switch($idisp)
{
case "1":
echo "<img src='".$image0s."'>";
break;
case 2:
echo $image0;
break;
default:
echo "EB";
}
break;
default:
echo "EA";
}