$hidden = $_POST['atitle'];
$id = $_POST['id'];
$tid = $_POST['tid'];
$title = trim($_POST['title']);
$oname = $_POST['oname'];
$name = trim($_POST['name']);
$file = trim($_POST['file']);
$type = $_POST['type'];
//echo "title is ".$title."
";
$Name = addslashes($name);
$Oname = addslashes($oname);
$Title = addslashes($title);
$File = addslashes($file);
$Type = addslashes($type);
if ($name == '')
{
print "
You must enter the name of the file . Please go back and try again.
";
exit();
}
if ($file == '')
{
print "
You must enter the full file location. Please go back and try again.
";
exit();
}
include("../include/dbconfig.php");
$connection = mysql_connect($db_host, $db_user, $db_pass) or die ("Unable to connect!");
mysql_select_db($db_name);
echo "mid ".$mid;
echo "id ".$id;
$query = "update OM_media set filename='$File', name='$Name' where id='$id'";
$result = mysql_query($query, $connection) or die ("Error in query: $query. " . mysql_error());
$ahidden = stripslashes($hidden);
header("Location: managetitle.php?title=$ahidden&id=$tid");
exit();
?>