Jump to content

cannot get video to display when echoed


frijole

Recommended Posts

I am trying to save the embed HTML for a youtube video into my DB so I can call it up later. I have a set-up where I enter the HTML into a textarea and then it shows me the echoed html, which should be the video but it is not displaying. I have tried all kinds of encoding decoding stuff with no change? can anyone lead me in the right direction? I have checked everywhere that I know.

 

If anyone knows a better way to do this I would love to hear it. Thanks.

 

<?php
if(!$_POST){?>

<html>

<table>

<tr>
<td> <form method="post" action="<?php echo $_SERVER['PHP_SELF'] ?>"> Embed HTML:</td> 
    <td> <textarea rows="5" cols="50" wrap="virtual" name="embedHTML"> Enter Embed HTML Here </textarea></td>
</tr>

<tr>
<td>Description: </td>
<td><textarea rows="5" cols="50" wrap="physical" name="description"> Describe The Video Here </textarea></td>
</tr>

<tr>
<td><input type="submit" value="Add Video!"></form></td>
</tr>

</table>

</html>

<?php
} else {

if (isset($_POST['embedHTML'])||isset($_POST['description']))
{
require_once("dbConnect.php");

$embedHTML = $_POST['embedHTML'];
$videoDesc = $_POST['description'];

echo "<html>";
echo "<blockquote>";
echo $embedHTML;
echo "</blockquote>";
echo "<br />";
echo "<blockquote>";
echo $videoDesc;
echo "</blockquote>";
echo "</html>";
}

}

?>

Link to comment
Share on other sites

sorry, didnt read it right.  THIS IS TESTED AND WORKS



<html>

<table>

<tr>
<td> <form method="post" action="<?php echo $_SERVER['PHP_SELF'] ?>"> Embed HTML:</td>
    <td> <textarea rows="5" cols="50" wrap="virtual" name="embedHTML"> Enter Embed HTML Here </textarea></td>
</tr>

<tr>
<td>Description: </td>
<td><textarea rows="5" cols="50" wrap="physical" name="description"> Describe The Video Here </textarea></td>
</tr>

<tr>
<td><input type="submit" value="Add Video!"></form></td>
</tr>

</table>

</html>

<?php


if (isset($_POST['embedHTML'])||isset($_POST['description']))
{
require_once("dbConnect.php");

$embedHTML = $_POST['embedHTML'];
$videoDesc = $_POST['description'];

echo "<html>";
echo "<blockquote>";
echo $embedHTML;
echo "</blockquote>";
echo "<br />";
echo "<blockquote>";
echo $videoDesc;
echo "</blockquote>";
echo "</html>";
}



?>

 

i used this for the embedded code:

<object width="425" height="355"><param name="movie" value="http://www.youtube.com/v/2GA3a15xF0c"></param><param name="wmode" value="transparent"></param><embed src="http://www.youtube.com/v/2GA3a15xF0c" type="application/x-shockwave-flash" wmode="transparent" width="425" height="355"></embed></object>

Link to comment
Share on other sites

you are escaping all quotes :

<object width=\"425\" height=\"355\"><param name=\"movie\" value=\"http://www.youtube.com/v/2GA3a15xF0c\"></param><param name=\"wmode\" value=\"transparent\"></param><embed src=\"http://www.youtube.com/v/2GA3a15xF0c\" type=\"application/x-shockwave-flash\" wmode=\"transparent\" width=\"425\" height=\"355\"></embed></object>

 

create a file called phpinfo.php and put this in it:

 

<?
phpinfp();
?>

send me a link. i believe u have magic quotes on

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.