MSV FM

dot.antimicrobial@66.96.161.157: ~ $
Path : /hermes/bosweb/b1705/trinix19.ipage.com/Backup/latestnews/settings/
File Upload :
Current < : /hermes/bosweb/b1705/trinix19.ipage.com/Backup/latestnews/settings/edit_val.php

<?php
include("connection.php");
$id=$_GET['id'];
session_start();
$name=$_SESSION['username'];
$contents=mysql_real_escape_string($_POST['contents']);
$subject=mysql_real_escape_string($_POST['subject']);
$category=mysql_real_escape_string($_POST['category']);
$query=mysql_query("UPDATE news_post SET contents='$contents' WHERE id='$id'") or die(mysql_error());
$query=mysql_query("UPDATE news_post SET subject='$subject' WHERE id='$id'") or die(mysql_error());
$query=mysql_query("UPDATE news_post SET category='$category' WHERE id='$id'") or die(mysql_error());
if($query){
	header("location:admin.php?updated");
	exit(0);
}
else
{
	header("location:edit_news.php?error");
	exit(0);
}

?>