<?php

require_once("dbcontroller.php");

session_start();

$class=@strtolower($_SESSION['class']);

$sub=($_SESSION['sub']);

$vall=strip_tags($_POST['editval']);

echo $sub;

$db_handle = new DBController();

$result = $db_handle->executeUpdate("UPDATE ".$class." set " . $_POST["column"] . " = '".$vall."' WHERE  REGNO='".$_POST["id"]."' and Subjects='$sub'");

$sql = "UPDATE `$class` set tot=(code+d2+d3ex) WHERE ID='$_POST[id]' and Subjects='$sub'";

						$faq = $db_handle->runQuery($sql);





?>