Mini Shell

Direktori : /home/rizant5/public_html_old/development/student/
Upload File :
Current File : /home/rizant5/public_html_old/development/student/change-course.php

<?php require_once("function-file.php");
require_once("function-menu.php");
require_once("../config.php");
cookiecheck();
$userid=$_SESSION["userid"];
$ds=$conn->prepare("select * from student_reg where stu_id='$userid'");
$ds->execute();$ress=$ds->fetch();
if(isset($_POST['save'])){
    $course_id=$_POST['course_id'];
    $note=$_POST['note'];
    $conn->exec("insert into course_change (userid,course_id,note) values ('$userid','$course_id','$note')");
    echo "<h2 align='center'>We will contact you as soon!</h2>";
    echo'<meta http-equiv="refresh" content="3; url=change-course.php">';
    exit;
}
?>
<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>Change Course</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 box-primary">
            <div class="box-header with-border sub-header">Change Course Request</h3>
            </div>
            <div class="box-body sub-body">
             	<form action="#" method="post" class="form-horizontal">
                    <div class="form-group">
                    	<div class="col-sm-12">
                        	<label>Course Name</label>
                                <select name="course_id" class="form-control" required>
                                <?php $data=$conn->prepare("select * from courses");
                                    $data->execute();$result=$data->fetchall();
				foreach($result as $row){echo"<option value='$row[course_id]' ";if($row['course_id']==$ress['course_id']){echo"selected";}echo">$row[course_name]</option>";}?>
                            </select>
                        </div>
                        </div>
                        <div class="form-group">
                            <div  class="col-sm-12">
                                    <label>Note</label>
                                    <textarea name="note" class="form-control" placeholder="Please type your note..."></textarea>
                            </div>
                        </div>
                        <div class="form-group">
                            <div  class="col-sm-12" align="center">
                                <button type="submit" name="save" class="btn btn-primary">Send Request</button>
                            </div>
                        </div>
                </form>
             </div>    
         </div>
   </section>
      </div><!-- /.content-wrapper -->
      <?php footer();?>
    </div><!-- ./wrapper -->
   <?php jsfile();?>
  </body>
</html>

Zerion Mini Shell 1.0