Phillip,

pretty close. only a few things that are missing/incorrect.
my corrections are marked by a #


> -----Original Message-----
> From: Phillip Pang [mailto:[EMAIL PROTECTED]
> // 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.
*************************************************************************************


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to