<?php

$con = new mysqli("localhost","root","toor","museam_db");
mysqli_set_charset($con, 'utf8');

// Check connection
if (mysqli_connect_errno())
  {
  echo "Failed to connect to MySQL: " . mysqli_connect_error();
  }

if(!isset($_POST['isid'])||!isset($_POST['isdb']))
    echo'Cannot get packets';

$super_name=$_POST['isdb'];
$super_id=$_POST['isid'];

if(!isset($_SESSION))
    session_start();

$result = $con->query("SELECT * FROM  ".$_POST['isdb']." WHERE id=".$_POST['isid'].";");
if ($result)
     if($result->num_rows){
        $_SESSION= $result->fetch_assoc();
        $_SESSION['type']=$super_name."_up";

    echo'session is loading..';
    }
    else
        echo'WARNING: unable to edit data in use';
 

?>