I am having similar issue with this code. I want to add "title". This script does not have write title option and I would like to add it to script, but it already has the add video option. That's why I tried to do something like this and I just can't get the script to insert title in the database, if you could help me with this one I would be very thankful. Here is the srcipt
<?
session_start();
include("../func/db_info".".php");
include("logincheck".".php");
logincheck();
$surl = $_SERVER['HTTP_HOST'] ;
if (strip_tags($_POST['add'])){
$vidid=mysql_real_escape_string(strip_tags($_POST['vidid']));
$url = "$vidid";
parse_str( parse_url( $url, PHP_URL_QUERY ), $my_array_of_vars);
$t1=mysql_real_escape_string(strip_tags($_POST['tit1']));
$title="$t1";
parse_str( $title, $my_vars );
mysql_query("INSERT INTO `videos` (`id`, `videoid`, `views`, `title`) VALUES ('', '".$my_array_of_vars['v']."', '0', '".$my_vars['v']."');") or die (mysql_error());
$message="<img src=\"../img/tick-icon.jpg\">";
}
if (strip_tags($_POST['rem'])){
$vidid2=mysql_real_escape_string(strip_tags($_POST['vidid2']));
$url = "$vidid2";
parse_str( parse_url( $url, PHP_URL_QUERY ), $my_array_of_vars );
mysql_query("DELETE FROM videos WHERE id=".$my_array_of_vars['v']."");
$message2="<img src=\"../img/tick-icon.jpg\">";
}
?><head>
<html xmlns:fb="http://ogp.me/ns/fb#">
<title>Admin Panel</title>
<META name="robots" content="NOINDEX,NOFOLLOW" />
<link type="text/css" rel="stylesheet" href="../css/admin.css" />
<link href="../img/favicon.ico" rel="icon" type="image/x-icon" />
<body>
<a href="index.php"><img src="../img/logo.png" border="0"></a>
<div class="banner"><a href="index.php">Delete</a> - <a href="add.php">Add & Remove</a> - <a href="logout.php">Logout</a></div>
<div align="center"><form id="form1" method="post" action="">
Youtube URL: <input type="text" name="vidid" id="vidid">
Title: <input type="text" name="tit1" id="tit1">
<input name='add' type='submit' id='add' value='Add Video' /> <? echo"$message";?><br><br>
Website URL: <input type="text" name="vidid2" id="vidid2">
<input name='rem' type='submit' id='rem' value='Remove Video' /> <? echo"$message2";?><br><br>
Example: <strong>http://<? echo"$surl"; ?>/watch.php?v=25</strong>
</div>
</form>
</body>