Not sure if anyone can help me with something like this. I am looking for a php script that can give me the following:
Webpage with a dropdown listing the numbers 1 to 5. Depending on what number is chosen, to execute a script to give me a set of results.
The results would be drawn from 5 tables. In the tables there would be an item listed with a category flag of red, blue, green or yellow.
For example: If the rating is 2:
* display 4 random results from table 1 where the category is red
* display 2 random result from table 2 where the category is red
* 20% chance to display a result from the blue category in table 1 or two.
If the rating is 3:
* display 5 random results from table 1 where the category is red
* display 3 random result from table 2 where the category is red
* display 1 random result from table 3 where the category is red
* 20% chance to display a result from the blue category in table 1 or two
* 5% chance to display a result from the green category in table 1 or two
How can this be done? Sorry, but my knowledge on PHP is dismal at best