<?php
session_start();
if($_SESSION["username"]=="")
{
 	echo "You are not Logged in Please <a href='index.html'>Sign in </a> First ";
}
else
{
include 'dbc.php';

$userid=$_SESSION["userid"];
$id=$_REQUEST["id"];
$sql = "SELECT * FROM addclass where id = '$id' and user_id='$userid'";
$result=$conn->query($sql);
$row = $result->fetch_assoc();
$cname=$row['cname'] ;

?>
<!doctype html>
<!--[if lt IE 7]>      <html class="no-js lt-ie9 lt-ie8 lt-ie7" lang=""> <![endif]-->
<!--[if IE 7]>         <html class="no-js lt-ie9 lt-ie8" lang=""> <![endif]-->
<!--[if IE 8]>         <html class="no-js lt-ie9" lang=""> <![endif]-->
<!--[if gt IE 8]><!-->
<html class="no-js" lang="en">
<!--<![endif]-->

<head>
   <?php include("includes/header.php") ?>
</head>

<body>


    <!-- Left Panel -->

    <?php include("includes/menu.php") ?><!-- /#left-panel -->

    <!-- Left Panel -->

    <!-- Right Panel -->

    <div id="right-panel" class="right-panel">

        <!-- Header-->
        <header id="header" class="header">

             <?php include("includes/product_menu.php") ?>

        </header><!-- /header -->
        <!-- Header-->

        <div class="breadcrumbs">
            <div class="col-sm-6">
                <div class="page-header float-left">
                    <div class="page-title">
                        <h1><? echo "" . $_SESSION["userid"]; ?></h1>
                    </div>
                </div>
            </div>
            <div class="col-sm-6">
                <div class="page-header float-right">
                    <div class="page-title">
                        <ol class="breadcrumb text-right">
                            <li class="active"><? echo "" . $_SESSION["username"]; ?></li>
                        </ol>
                    </div>
                </div>
            </div>
        </div>

        <div class="content mt-3">

           


          <div class="col-lg-8">
                        <div class="card">
                            <div class="card-header"><strong>Add New Item Type</strong><small> Form</small></div>
                            <div class="card-body card-block">
							<form action="Update_Class.php" method="post" enctype="multipart/form-data" class="form-group">
							<div class="col-8">
                                <div class="form-group"><label for="cname" class=" form-control-label">Type Name</label><input type="text" id="cname" name="cname" placeholder="Enter Type name" class="form-control" value="<? echo $cname ?>" readonly=""></div>
								</div>
								<div class="col-8">
                                <div class="form-group"><label for="cname" class=" form-control-label">Change Type Name</label><input type="text" id="cname1" name="cname1" placeholder="Enter Type name" class="form-control"></div>
								</div>
								<div class="col-4">
                                    <div class="form-group"><label for="id" class=" form-control-label">ID</label><input type="text" id="id" name="id" placeholder="Id" class="form-control" value="<? echo $id ?>"></div>
									</div>
									
				
													
                                                    </div>
													<div class="card-footer">
                                                        <button type="submit" class="btn btn-primary btn-sm">
                                                            <i class="fa fa-dot-circle-o"></i> Update Type
                                                        </button>
                                                        <button type="reset" class="btn btn-danger btn-sm">
                                                            <i class="fa fa-ban"></i> Reset
                                                        </button>
                                                    </div>
													
													</form>
                                                </div>
                                            </div>

            


        </div> <!-- .content -->
    </div><!-- /#right-panel -->

    <!-- Right Panel -->

   <?php include("includes/footermenu.php") ?>

</body>

</html>
<?php
}
?>