How to open random Flash page with hyperlink?
| From: | Phillip Pang | Date: | Fri, 22 Aug 2003 02:57:39 +0000 |
| Subject: | How to open random Flash page with hyperlink? | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-160381@lists.php.net to get a copy of this message | ||
Hey everyone,
I'm new to using PHP so please bear with me.
I'm trying to create a hyperlink that will open a random Flash page so that
users will see a different flash module each time. Here is some of the code
that I wrote but I'm not sure if it'll work since I'm not very good at
coding. Oh yeah, I'm not using a database either.
// random_menu.html
<head>
<?php
$i = rand(0,3);
?>
</head>
<body>
<a href = "www.x.com/random.php?i=$i">x</a>
</body>
---------------------------
// random.php
<head>
<?php
$i = $_post["i"];
if ($i = = 0){
$value = "a";
}
else if ($i = = 1){
$value = "b";
}
...etc.
</head>
<body>
<object>
<param name="movie" value="$value">
<embed src="$value"></embed>
</object>
</body>
Please help if you know how to do this. Thanks in advance.
phil*