Hi,
I am close to the roll out of a complete rework of an entire website. I was adding more statements to a script that I am using when it broke.
The script is rather basic, I pass along an id number, if the number is there it does something, echo, include, readfile etc.
<?php
if ($id == imagepath1) {
echo ('<img src="imagepath1.jpg">');
}
if ($id == imagepath2) {
echo ('<img src="imagepath2.jpg">');
}
if ($id == imagepath3) {
echo ('<img src="imagepath3.jpg">');
}
if ($id == imagepath4) {
echo ('<img src="imagepath4.jpg">');
}
if ($id == imagepath5) {
echo ('<img src="imagepath5.jpg">');
}
if ($id == imagepath6) {
echo ('<img src="imagepath6.jpg">');
}
?>
My problem occured that after I added the fifth and sixth if's the script started returing one result for half of the if's, two results for some of them. I am guessing that this script isnt able to handle to many statements (if that is right). I was planning on rewriting it and streamlineing it once the site was done. But it broke. Any reccomendations on how I can streamline and clean this up, or does anybody have a better reccomendation. I know there are no else's or then's but I was trying to stay simple.
Aaron