Jump to content

Some crazy stuff


ecabrera

Recommended Posts

<?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
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.