I have this code. The red colored links represent the randomized links i intend the to have the forms posted to. I just need to know if someone could please write the code needed to apply this code or something like it. Essentially I just need the page forwarding script to execute and move some variables in a hidden form to the page that it is directed to go to via the forwarding script. So the red links need to fill the green spot on the form. But i also need the form to be submitted automatically. I don't know any better way to explain it.
I will also need to know how to put the randomURL into the method area, i have tried several things it just does not want to work. If anyone wants to jump in on this one for assistance please help.
I am somewhat new to things and my understanding of terminology is still lacking, so I pretty much have to google things if I have difficulty coding it myself. If I cant find it on google I proceed to ask on forums as a last resort. Any help with this would be extremely appreciated.
Code:<script language="JavaScript"> <!-- day = new Date(); hr = day.getSeconds(); if ((hr >= 0) && (hr <= 6)) { randomURL = "http://cherry.com/chatroom.php"; } if ((hr > 6) && (hr <= 12)) { randomURL = "http://apples.com/chatroom.php"; } if ((hr > 12) && (hr <= 18)) { randomURL = "http://blah.com/chatroom.php"; } if ((hr > 18) && (hr <= 24)) { randomURL = "http://pears.com/chatroom.php"; } if ((hr > 24) && (hr <= 30)) { randomURL = "http://grapes.com/chatroom.php"; } if ((hr > 30) && (hr <= 36)) { randomURL = "http://desksandchairs.com/chatroom.php"; } if ((hr > 36) && (hr <= 42)) { randomURL = "http://peaches.com/chatroom.php"; } if ((hr > 42) && (hr <= 48)) { randomURL = "http://tigerlillies.com/chatroom.php"; } if ((hr > 48) && (hr <= 54)) { randomURL = "http://foriegner.com/chatroom.php"; } if ((hr > 54) && (hr <= 60)) { randomURL = "http://pianos.com/chatroom.php"; } document.write("<meta http-equiv='refresh' content='3;url=" + randomURL + "'>"); // --> </script>
Code:<form action="The spot where forwarding link goes" method="post"> <br><input type="hidden" name="variable1" value="<? echo $_POST['blah']; ?>"> <br><input type="hidden" name="variable2" value="<? echo $_POST['hmmmm']; ?>"> <br><input type="submit" value="Submit!"> </form>



Reply With Quote


Bookmarks