Jump to content

Some crazy stuff


ecabrera

Recommended Posts

Why is it when a save a youtube video on my db it gives me this

 

<iframe width="220" height="240" src="http://www.youtube.com/embed/DCZ2l1BbWyY?wmode=opaque" frameborder="0" allowfullscreen></iframe><br>

 

i have to save it twice so it can be view why if you want to see my edit videos page i will add it here

Link to comment
https://forums.phpfreaks.com/topic/259497-some-crazy-stuff/
Share on other sites

<?php

require "scripts/connect.php";

if($_POST['submitbtn']){

$video1 = mysql_real_escape_string($_POST['video1']);
$video2 = mysql_real_escape_string($_POST['video2']);
$video3 = mysql_real_escape_string($_POST['video3']);
$video4 = mysql_real_escape_string($_POST['video4']);

if($video1){
if($video2){
if($video3){
if($video4){

$query = mysql_query("UPDATE videos SET video1='$video1',video2='$video2',video3='$video3',video4='$video4'");

header("location: http://www.mywebsite/admin/editvideos");

}else
$msg = "PLEASE FILL IN";
}else
$msg = "PLEASE FILL IN";
}else
$msg = "PLEASE FILL IN";
}else
$msg = "PLEASE FILL IN";
}
mysql_close();
?>
<?php include "header.php";?>
<?php if($email){?>

<?php include "inc/nav.php"; ?>

<div id="righthomecontent">

<?php
require "scripts/connect.php";

$query = mysql_query("SELECT * FROM videos");
$rows = mysql_fetch_assoc($query);

$video1 = stripslashes($rows['video1']);
$video2 = stripslashes($rows['video2']);
$video3 = stripslashes($rows['video3']);
$video4 = stripslashes($rows['video4']);

mysql_close();
?>
<center>MUST USE THIS IN VIDEOS ?wmode=opaque"</center><br>
<center>All videos are Width='220' and Height='240'</center><br>

<form class="editvideoform" action="editvideos" method="post">
<table>
<tr>
<td></td>
<td><?php echo $msg;?></td>
</tr>
<tr>
<td>VIDEO 1</td>
<td><textarea cols=25 rows=10 name="video1"><?php echo $video1;?></textarea></td>
</tr>
<tr>
<td>VIDEO 2</td>
<td><textarea cols=25 rows=10 name="video2"><?php echo $video2;?></textarea></td>
</tr>
<tr>
<td>VIDEO 3</td>
<td><textarea cols=25 rows=10 name="video3"><?php echo $video3;?></textarea></td>
</tr>
<tr>
<td>VIDEO 4</td>
<td><textarea cols=25 rows=10 name="video4"><?php echo $video4;?></textarea></td>
</tr>
<tr>
<td></td>
<td><input type="submit" name="submitbtn" value="SUBMIT" /></td>
</tr>
</table>
</form>

</div>
<?php } else 
{
echo "<center><h1>PLEASE LOGIN</h1></center>";
}
?>
<?php include "footer.php";?>

Link to comment
https://forums.phpfreaks.com/topic/259497-some-crazy-stuff/#findComment-1330209
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.