Re: How to open random Flash page with hyperlink?
| From: | murugesan | Date: | Fri, 22 Aug 2003 04:17:07 +0000 |
| Subject: | Re: How to open random Flash page with hyperlink? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-160386@lists.php.net to get a copy of this message | ||
Hello
some more changes
<param name="movie" value="<?php echo $value ?>">
<embed src="<?php echo $value ?>"></embed>
-murugesan
----- Original Message -----
From: "Cody Phanekham" <Cody.Phanekham@salmat.com.au>
To: <php-general@lists.php.net>
Sent: Friday, August 22, 2003 9:32 AM
Subject: RE: [PHP] How to open random Flash page with hyperlink?
Phillip,
pretty close. only a few things that are missing/incorrect.
my corrections are marked by a #
> -----Original Message-----
> From: Phillip Pang [mailto:ppang@charter.net]
> // random_menu.html
> <head>
> <?php
> $i = rand(0,3);
> ?>
> </head>
>
> <body>
> <a href = "www.x.com/random.php?i=$i">x</a>
# you need to go back to php mode to use $i
<a href = "www.x.com/random.php?i=<? echo $i ?>">x</a>
> </body>
>
> ---------------------------
>
> // random.php
> <head>
> <?php
> $i = $_post["i"];
# im pretty sure the value would be past via the GET method as the user would be clicking the
hyperlink, so it should look like
$i = $_GET["i"];
>
> if ($i = = 0){
# there shouldnt be any spaces for the comparison
if ($i == 0){
> $value = "a";
> }
> else if ($i = = 1){
# there shouldnt be any spaces for the comparison
else if ($i == 1){
> $value = "b";
> }
> ...etc.
# dont forget to get out of php mode
?>
> </head>
>
> <body>
> <object>
> <param name="movie" value="$value">
# need to go back to php mode to use $value
<param name="movie" value="<?php echo $value ?>">
> <embed src="$value"></embed>
# need to go back to php mode to use $value
<embed src="<?php echo $value ?>"></embed>
> </object>
> </body>
>
> Please help if you know how to do this. Thanks in advance.
>
> phil*
-murugesan