Hello some more changes <param name="movie" value="<?php echo $value ?>"> <embed src="<?php echo $value ?>"></embed>
-murugesan ----- Original Message ----- From: "Cody Phanekham" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> 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:[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="<?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