ok

Mini Shell

Direktori : /home2/selectio/public_html/thedentalpark.com/admin/
Upload File :
Current File : /home2/selectio/public_html/thedentalpark.com/admin/placement-add.php

<?php  include "header.php";?>

<?php
if(isset($_POST['add_placement'])){
        try{

        $year=$_POST['year'];
        $date=$_POST['date'];
        $company_name=$_POST['company_name'];
        $student=$_POST['student'];
                    $statement = $pdo->prepare("INSERT INTO `tbl_placement`(`year`,`date`,`company_name`,`students`)
                    VALUES ('$year','$date','$company_name','$student')");
                  
                   	$result = $statement->execute();
                   
                    if($result){
                     echo  '<script type="text/javascript">
                        alert("New Placemnt Added successfully");
                        window.location.href = "placement-details.php";
                        </script>';
                        unset($_POST);      
                    }else{
                      echo  '<script type="text/javascript">
                        alert("Something went wrong try again...");
                       window.location.href = "banner-add.php";
                        </script>';
                    }  
                }catch(Exception $e){
                    $error=$e;
                }   
    }
?>

<div class="content-wrapper" style="background:white;">
        <div class="clearfix"></div>

<section class="content">
    <div class="row">
        <div class="col-xs-12">
            <div>
                <div class="box-header">
                    <h3 class="box-title"><b>Add New Placement: </b></h3>
                </div>
                <div class="box-body">
                    <div class="col-lg-12">
<!--<div id="loading-div">
<center><img src="assets/load.gif" style="10%"><br>
<strong class="blink_me">Loading Pls Wait... </strong></center>
</div>
<div id="success-div">
</div>-->
<div id="content-div">
                        <form action="" enctype="multipart/form-data" method="post" accept-charset="utf-8">
                            <div class="row">

                            <div class="col-md-4">
                                <div class="form-group">
                                    <label class="required" for="file">Choose Year </label>                                    
                                    <input type="Text" name="year"  id="photo" value="" placeholder="Enter Year" class="form-control tip" required="required" />
                                
                                </div>
                                <span style="color: red;" id="photospan"></span>
                            </div>
                            <div class="col-md-4">
                                <div class="form-group">
                                    <label class="required" for="file">Date </label>                                    
                                    <input type="date" name="date"  id="photo" value="" placeholder="Enter Date" class="form-control tip" required="required" />
                                
                                </div>
                                <span style="color: red;" id="photospan"></span>
                            </div>
                            <div class="col-md-4">
                                <div class="form-group">
                                    <label class="required" for="file">Company Name </label>                                    
                                    <input type="text" name="company_name"  id="photo" value="" placeholder="Enter Company Name" class="form-control tip" required="required" />                                                                </div>
                                <span style="color: red;" id="photospan"></span>
                            </div>
                            <div class="col-md-4">
                                <div class="form-group">
                                    <label class="required" for="file">Enter No.Students Selected </label>                                    
                                    <input type="text" name="student"  id="photo" value="" placeholder="Enter No.Students Selected" class="form-control tip" required="required" />                                                                </div>
                                <span style="color: red;" id="photospan"></span>
                            </div>

                            
                            <div class="col-md-4">
                                <div class="form-group">
                                    <label class="required" for="file">Action</label><br>
                                    <input type="submit" id="add_category" name="add_placement" value="Add Placement"  class="btn btn-success" />
                                </div>
                            </div>
 
                             
                             
                        </div>
                        </form>
</div>



<div class="form-group" style="text-align:center;">
    <a href="gallery-add.php"><button class="btn btn-primary" ><i class="fa fa-refresh"></i> Reset Form</button></a>
    <a href="gallery.php"><button class="btn btn-warning" ><i class="fa fa-chevron-left"></i> Back to List</button></a>
 </div>
                    
                    <div class="clearfix"></div>
                </div>
            </div>
        </div>
    </div>
</section>

<style>
    table,td,th{
        padding:5px;
    }
    th{
        border: 1px solid black;
    }
    td{
        border: 1px solid black;
        border-style: dashed;
    }
</style>
<?php include "footer.php";?>

Zerion Mini Shell 1.0