Jump to content

Variable help??


Zoofu

Recommended Posts

<?php
session_start();
include "./globals.php";

?>

<html>

<head>
	<title>Zoofu | View Item</title>
	<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" />
	<link rel="icon" href="/favicon.ico" type="image/x-icon" />
	<link rel="stylesheet" type="text/css" href="./style.css">
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

</head>

<body>
<center>

<?php 
$id = $_GET['id'];
$query = mysql_query("SELECT * FROM videos WHERE `id`=".$id."");
$fetch_array = mysql_fetch_array($query);
$id = $fetch_array['id'];
$imageurl = $fetch_array['path'];

$sel=mysql_query("SELECT * FROM `videos` WHERE `id`=".$id."") OR die(mysql_error());
$row=mysql_fetch_array($sel);

echo "<center><table border=\"0\" cellspacing=\"3\" cellpadding=\"3\" width=\"80%\">\n";
echo "<tr><td class=\"forum_header\"><center><br>ItemID: ".$id."</center></td></tr>\n";
echo "<br>\n";
echo "</table></center>\n";

echo '<OBJECT ID="MediaPlayer" WIDTH="192" HEIGHT="190" CLASSID="CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95"
STANDBY="Loading Windows Media Player components..." TYPE="application/x-oleobject">
<PARAM NAME="FileName" VALUE=".$imageurl.">
<PARAM name="autostart" VALUE="false">
<PARAM name="ShowControls" VALUE="true">
<param name="ShowStatusBar" value="false">
<PARAM name="ShowDisplay" VALUE="false">
<EMBED TYPE="application/x-mplayer2" SRC=".$imageurl." NAME="MediaPlayer"
WIDTH="600" HEIGHT="450" ShowControls="1" ShowStatusBar="0" ShowDisplay="0" autostart="0"> </EMBED>
</OBJECT>';
?>




</center>
</body>

</html>

 

echo '<OBJECT ID="MediaPlayer" WIDTH="192" HEIGHT="190" CLASSID="CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95"
STANDBY="Loading Windows Media Player components..." TYPE="application/x-oleobject">
<PARAM NAME="FileName" VALUE=".$imageurl.">
<PARAM name="autostart" VALUE="false">
<PARAM name="ShowControls" VALUE="true">
<param name="ShowStatusBar" value="false">
<PARAM name="ShowDisplay" VALUE="false">
<EMBED TYPE="application/x-mplayer2" SRC=".$imageurl." NAME="MediaPlayer"
WIDTH="600" HEIGHT="450" ShowControls="1" ShowStatusBar="0" ShowDisplay="0" autostart="0"> </EMBED>
</OBJECT>';

 

^^^^^^

That part, how come.. It won't load, and when I clicked properties it said www.my-buzz.co.cc/.$imageurl.

 

It's supposed to change to the path field right?

Link to comment
https://forums.phpfreaks.com/topic/175564-variable-help/
Share on other sites

You're messing up your quotes. Anything inside of single quotes (' ') will parsed as a string, not a variable.

 

echo '<OBJECT ID="MediaPlayer" WIDTH="192" HEIGHT="190" CLASSID="CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95"
STANDBY="Loading Windows Media Player components..." TYPE="application/x-oleobject">
<PARAM NAME="FileName" VALUE="' . $imageurl . '">
<PARAM name="autostart" VALUE="false">
<PARAM name="ShowControls" VALUE="true">
<param name="ShowStatusBar" value="false">
<PARAM name="ShowDisplay" VALUE="false">
<EMBED TYPE="application/x-mplayer2" SRC="' . $imageurl . '" NAME="MediaPlayer"
WIDTH="600" HEIGHT="450" ShowControls="1" ShowStatusBar="0" ShowDisplay="0" autostart="0"> </EMBED>
</OBJECT>';

Link to comment
https://forums.phpfreaks.com/topic/175564-variable-help/#findComment-925112
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.