RE: [PHP] How to open random Flash page with hyperlink?
| From: | Cody Phanekham | Date: | Fri, 22 Aug 2003 04:02:02 +0000 |
| Subject: | RE: [PHP] How to open random Flash page with hyperlink? | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-160385@lists.php.net to get a copy of this message | ||
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="<? echo $value ?>">
> <embed src="$value"></embed>
# need to go back to php mode to use $value
<embed src="<? echo $value ?>"></embed>
> </object>
> </body>
>
> Please help if you know how to do this. Thanks in advance.
>
> phil*
hope that helps
Cody
*************************************************************************************
This e-mail, including any attachments to it, may contain confidential and/or personal information.
If you have received this e-mail in error, you must not copy, distribute, or disclose it, use or
take any action
based on the information contained within it.
Please notify the sender immediately by return e-mail of the error and then delete the original
e-mail.
The information contained within this e-mail may be solely the opinion of the sender and may not
necessarily
reflect the position, beliefs or opinions of Salmat on any issue.
This email has been swept for the presence of computer viruses known to Salmat's anti-virus
systems.
For more information, visit our website at www.salmat.com.au.
*************************************************************************************