Well I have my code, which I spent a while working. I had it working perfectly until I put the else statement at the end:
So that works, but why when I have $img being "Dougies Rugby Team in P3.gif" why does the if and else statements both appear? It is very strange. Even stranger is that when I have $img being "Dougies Rugby Team in P3.gif2" only that if statement appears (this is what I want!)
I am sorry if that was difficult to understand. If you can understand a bit just ask and I will attempt to explain more clearly.
| Code: |
| <?php
$img = @$_GET['image']; if ( $img == "Dougies Rugby Team in P3.gif" ) { echo " <img src=\"http://www.dougie.logical-host.com/photos/$img\" width=\"100%\" height=\"100%\"/><br/>"; echo "<body bgcolor=\"#FFFFFF\"><div align=\"center\"><iframe src=\"http://www.dougie.logical-host.com/tagbox1/\" width=\"210\" height=\"400\" frameborder=\"0\" border=\"0\"></iframe></div>"; } if ( $img == "Dougies Rugby Team in P3.gif2" ) { echo " <img src=\"http://www.dougie.logical-host.com/photos/$img\" width=\"100%\" height=\"100%\"/><br/>"; echo "<body bgcolor=\"#FFFFFF\"><div align=\"center\"><iframe src=\"http://www.dougie.logical-host.com/tagbox2/\" width=\"210\" height=\"400\" frameborder=\"0\" border=\"0\"></iframe></div>"; } else { echo "<img src=\"http://www.dougie.logical-host.com/photos/$img\" width=\"100%\" height=\"100%\"/><br/>"; echo "<body bgcolor=\"#FFFFFF\"><div align=\"center\"><iframe src=\"http://www.dougie.logical-host.com/tagbox2/\" width=\"210\" height=\"400\" frameborder=\"0\" border=\"0\"></iframe></div>"; } ?> |
So that works, but why when I have $img being "Dougies Rugby Team in P3.gif" why does the if and else statements both appear? It is very strange. Even stranger is that when I have $img being "Dougies Rugby Team in P3.gif2" only that if statement appears (this is what I want!)
I am sorry if that was difficult to understand. If you can understand a bit just ask and I will attempt to explain more clearly.
