<?php

ob_start();

if (!session_start()) {
    session_start();
}

try {
    $db = new PDO('mysql:host=localhost;dbname=gdhhsxmy_monsoonvibespublica;charset=utf8', 'gdhhsxmy_monsoonvibespublica', 'monsoonvibespublica');
} catch (Exception $e) {
    echo 'Error has Occured';
}



$n1 = $_POST['id'];
$n2 = $_POST['title'];




$stmt = $db->prepare("UPDATE category SET title='$n2'  where id=$n1 ");

$stmt->execute();
header('location:../category.php');
exit();
