Here's my first contribution: Random background images
Code:
$randimg = rand (1, 4);
if ($randimg == 1){
$backIMG = "blueclouds.png";
}
else if ($randimg == 2){
$backIMG = "redclouds.png";
}
else if ($randimg == 3){
$backIMG = "sunrise.png";
}
else if ($randimg == 4){
$backIMG = "dfsig.png";
}
You essentialy count up how many random background images you have, and set that for the secound value in the rand function. So if you had 5 random backgrounds, your rand would look like rand(1,5) (In this case, 1 is the minimum random value, and 5 is the max). Then, in the big if-then tree, add in your images by their name. It doesn't matter what random number you associate them, because it's all random
.
This code can go anywhere above the functions, like between line numbers 1 and 50. Also be sure to comment out (//)
"$backIMG = "sigtest.png"; // you can use URL for the image here too"
So that all that work you did doesn't get overwritten every single time
.