Forum Moderators: coopster
php link : index.php?x=20893
<?php
$x = $_REQUEST['x'];
$20893 = "SuperMan Movie(example..)"; // Title For Movie ->
$movie_title = $x;
?>
how i can make this script if x = 20893 to show $20893 to $movie_title
<?=$movie_title?> = SuperMan Movie(example..)
sorry for my bad english
play.php php script
<?php
$x = $_REQUEST['x']; // Cod From Player ->
$20893 = "Movie1"; // Title For Movie ->
$20894 = "Movie2"; // Title For Movie ->
$20895 = "Movie3"; // Title For Movie ->
$movie_title = .... // Title Movie For Player ->
?>
<?php include("include/config.php"); ?>
<?php include("header.php"); ?>
<?=$movie_title?><br />
<object width="584" height="458">
<param name="movie" value="http://www.anotherweb.com" />
<param name="FlashVars" value="id=<?=$x?>" />
<embed src="http://www.anotherweb.com?id=<?=$x?>" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" quality="high" allowfullscreen="true" width="584" height="458" />
</object>
<?php include("footer.php"); ?>
how i can make $movie_title to read no of $_REQUEST['x'] ? so $movie_title to take this $20893 = "Movie1"; // Title For Movie ->
and to show someting like this :
Movie1<br />
<object width="584" height="458">
<param name="movie" value="http://www.anotherweb.com" />
<param name="FlashVars" value="id=20893" />
<embed src="http://www.anotherweb.com?id=20893" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" quality="high" allowfullscreen="true" width="584" height="458" />
</object>
i try to i show becouse i dont know how to explain more good ... im sorry
[edited by: DjZoC at 8:19 pm (utc) on Feb. 27, 2009]
$20893 = "Movie1"; // Title For Movie ->
$20894 = "Movie2"; // Title For Movie ->
$20895 = "Movie3"; // Title For Movie ->
<?php
$titles = array(
'20893' => 'Movie1',
'20894' => 'Movie2',
'20895' => 'Movie3',
);
$x = $_REQUEST['x'];
$movie_title = isset [php.net]($titles[$x]) ? $titles[$x] : 'Unknown';
include 'include/config.php';
include 'header.php';
print htmlentities [php.net]($movie_title);
?>
<br />
object width="584" height="458">
...
play.php script
<?php
$playertype = array(
'vd1' => 'video1',
'vd2' => 'video2',
);
$p = $_REQUEST['p']; // Player Type ->
$player = isset($playertype[$p]) ? $playertype[$p] : 'UnknownPlayer';
?>
how i can make if player = UnknownPlayer to redirect on index.php ? thanks for help man you are the best
if ( !isset($playertype[$p]) ) {
header("Location: [yoursite.com...]
} else {
// continue with the script
}