frijole Posted March 10, 2008 Share Posted March 10, 2008 I am trying to get this script to show back to me what I have entered into the form. In this case it is a video, the embed HTML of a video off youtube actually. And it will not display when i echo it? Could there be something wrong with the way I am formatting it? Any ideas would be greatly appreciated. Here is my code as well: <?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 = trim(mysql_real_escape_string($_POST['embedHTML'])); $videoDesc = trim(mysql_real_escape_string($_POST['description'])); echo "<blockquote>"; echo $embedHTML; echo "</blockquote>"; echo "<br />"; echo "<blockquote>"; echo $videoDesc; echo "</blockquote>"; } } ?> Link to comment https://forums.phpfreaks.com/topic/95318-video-will-not-display-because-of-missing-plugin-but-plugin-is-not-missing/ Share on other sites More sharing options...
frijole Posted March 10, 2008 Author Share Posted March 10, 2008 this is actually a php question, I should have written that in the title. Link to comment https://forums.phpfreaks.com/topic/95318-video-will-not-display-because-of-missing-plugin-but-plugin-is-not-missing/#findComment-488249 Share on other sites More sharing options...
frijole Posted March 10, 2008 Author Share Posted March 10, 2008 has anyone experienced this before? Link to comment https://forums.phpfreaks.com/topic/95318-video-will-not-display-because-of-missing-plugin-but-plugin-is-not-missing/#findComment-488606 Share on other sites More sharing options...
bpops Posted March 10, 2008 Share Posted March 10, 2008 Doesn't mysql_real_escape_string() remove all HTML formatting? Or am I thinking of something else? If so, this is your problem. Link to comment https://forums.phpfreaks.com/topic/95318-video-will-not-display-because-of-missing-plugin-but-plugin-is-not-missing/#findComment-488617 Share on other sites More sharing options...
frijole Posted March 10, 2008 Author Share Posted March 10, 2008 I think the tags are intact because when I display it to the screen it shows a box that is the correct size that the video would be, only it has the puzzle piece on it which meant that I am missing a plugin. When I try to get the plugin it says it cannot find the missing plugin, so I think something is being modified that makes the browser think it needs some plugin that doesn't exist. Link to comment https://forums.phpfreaks.com/topic/95318-video-will-not-display-because-of-missing-plugin-but-plugin-is-not-missing/#findComment-488622 Share on other sites More sharing options...
bpops Posted March 10, 2008 Share Posted March 10, 2008 If you're just displaying the code, why are you running mysql_real_escape_string() and trim() on it anyway? You typically only want to clean this stuff before you put it into your mysql table. Link to comment https://forums.phpfreaks.com/topic/95318-video-will-not-display-because-of-missing-plugin-but-plugin-is-not-missing/#findComment-488625 Share on other sites More sharing options...
frijole Posted March 10, 2008 Author Share Posted March 10, 2008 that could be it..... Your right I am not sure why... I modified this script from one where I was inserting into the DB, so all of that modification is probably unnecessary. Thanks, I think thats the answer. Link to comment https://forums.phpfreaks.com/topic/95318-video-will-not-display-because-of-missing-plugin-but-plugin-is-not-missing/#findComment-488639 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.