Mini Shell

Direktori : /proc/self/root/proc/self/root/proc/thread-self/root/home/rizant5/www/admin/
Upload File :
Current File : //proc/self/root/proc/self/root/proc/thread-self/root/home/rizant5/www/admin/subject-new.php

<?php 
require_once("../config.php");
require_once("function-file.php");
require_once("function-menu.php");
cookiecheck();
if(isset($_POST['save'])){
	$course_id=$_POST['course_id'];
	$subject_name=$_POST['subject_name'];
	$subject_desc=$_POST['subject_desc'];
	$conn->exec("insert into subjects (course_id,subject_name,subject_desc) VALUES ('$course_id','$subject_name','$subject_desc')");
	header("location:courses.php");
}
?>
<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>Add New Subject</title>
    <!-- Tell the browser to be responsive to screen width -->
    <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
    <?php  cssfile();?>
  </head>
  <body class="hold-transition skin-blue layout-top-nav">
    <!-- Site wrapper -->
    <div class="wrapper">
<?php headermenu();?>
      <!-- =============================================== -->
      <!-- Content Wrapper. Contains page content -->
      <div class="content-wrapper">
        <!-- Content Header (Page header) -->
        <!-- Main content -->
        <section class="content">
          <!-- Default box -->
          <div class="box">
            <div class="box-header with-border">
              <h3 class="box-title">Add New Subject</h3>
              <div class="box-tools pull-right">
                <a href="courses.php" class="btn btn-info btn-sm" ><i class="fa fa-angle-double-left"></i> Back</a>
              </div>
            </div>
            <div class="box-body">
            <form action="#" method="post" role="form" class="form-horizontal">
              <div class="form-group">
              <div class="col-sm-6"><label>Course Name <span class="required">*</span></label><Select name="course_id" class="form-control" required>
              <option value="">--Select Course Name--</option>
             <?php $data=$conn->prepare("select * from courses where course_status='0'");
					$data->execute();$result=$data->fetchall();
					foreach($result as $row){
						echo "<option value='$row[course_id]' ";if($row['course_id']==$_GET['course_id']){echo"selected";}echo">$row[course_name]</option>";
					}?>
              </Select></div>
              		
              </div>
               <div class="form-group">
              		<div class="col-sm-6"><label>Subject Name <span class="required">*</span></label><input name="subject_name" class="form-control" placeholder="Enter Subject Name" required></div>
              </div>
               <div class="form-group">
              		<div class="col-sm-12"><label>Subject Description</label>
                    <textarea name="subject_desc" class="form-control" placeholder="Type Subject Description if any.." rows="4"></textarea></div>
              </div>
              <div class="form-group">
              		<div class="col-sm-12" align="right">
                    <button type="reset"  class="btn btn-default" rows="4">Reset</button>&nbsp;&nbsp;
                    <button  type="submit" name="save" class="btn btn-success" >Save</button></div>
              </div>
            </div><!-- /.box-body -->
          </div><!-- /.box -->
        </section><!-- /.content -->
      </div></div><!-- /.content-wrapper -->
      <?php footer();?>
    </div><!-- ./wrapper -->
   <?php jsfile();ratenum();?>
  </body>
</html>

Zerion Mini Shell 1.0