exp_form.php
<?php include('experience.php'); ?>
<?php
include('server.php');
if(isset($_SESSION['loggedin']))
{
$user_email = $_SESSION['Logged_email'];
$student_id = $_SESSION['id'];
$name = $_SESSION['name'];
$roll = $_SESSION['roll'];
?>
<!DOCTYPE html>
<html lang="en">
<head>
<title>Placement Experience | Share</title>
<!-- Bootstrap -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">
<!--user icon -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<!-- Google Font -->
<link href="https://fonts.googleapis.com/css2?family=Montserrat:wght@700&display=swap" rel="stylesheet">
<link href="https://fonts.googleapis.com/css2?family=Nunito:wght@800&family=Roboto+Mono&display=swap" rel="stylesheet">
<link href="https://fonts.googleapis.com/css2?family=Montserrat:wght@500&display=swap" rel="stylesheet">
<link rel="stylesheet" type="text/css" href="css/style.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
</head>
<body>
<div class="row">
<div class="col-sm-3" style="left:0px;">
<div class="container-fluid sidenav">
<a href="mainpage.php"><img src="img/logoo.png" style="width:100px; margin-top:15px;"></a>
<br><br>
<div id="cse">
<a style="text-decoration: none;" href="https://www.cse.iitb.ac.in" target="_blank">
<h6 style="text-align: center;">Department of</h6>
<h6 style="text-align: center;">Computer Science and Engineering</h6>
<h5 style="text-align: center;">IIT Bombay</h5>
</a>
</div>
<br><br>
<ul>
<li><a href="mainpage.php"> HOME </a></li>
<li><a href="posts.php"> POSTS </a></li>
<li><a href="exp_form.php">SHARE</a></li>
<li><a href="profile.php"> PROFILE </a></li>
</ul>
<br><br>
<div id="iLinks">
<h5>Important Links</h5>
<ul>
<li style="font-size:10px;"><a href="http://www.iitb.ac.in/" target=_blank> IITB Home</a></li>
<li style="font-size:10px;"><a href="https://www.cse.iitb.ac.in/"> CSE@IITB </a></li>
<li style="font-size:10px;"><a href="https://asc.iitb.ac.in/"> ASC </a></li>
</ul>
</div>
<br><br>
</div>
</div>
<div class="container-fluid col-md-8 whole" style="margin-top:0px;">
<div class="row">
<div class="col-sm-8 main" id="title">
<img src="img/heading_trans.png" alt="placementExperience" style="align-content: center; margin-left: 25%; margin-right: 25%;">
</div>
<div class="col-sm-4" style="left:0px; padding-top:20px; vertical-align: center;">
<button id="logout" type="button" class="btn btn-info btn-round" style="float:right;">
Logout
</button>
<a href="profile.php"><i class="fa fa-user-circle-o" style="font-size:36px; float:right; padding-right:10px;" ></i></a>
</div>
</div>
<hr class="lineform">
<h2 style="text-align: center;"><b>Experience Form</b></h2>
<br>
<div class="bg-white p-5 mb-5">
<form action="experience.php" method="post">
<div class="form-group">
<label for="name">Name:</label>
<input type="hidden" name="student_id" value="<?= ($student_id) ?: $student_id ?>">
<input type="text" class="form-control" placeholder="Enter full name" id="name" name="name" required value="<?= ($name) ?: $name ?>" readonly>
</div>
<div class="form-group">
<label for="roll">Roll No:</label>
<input type="text" class="form-control" placeholder="Enter CSE Roll number" id="roll" name="roll" required value="<?= ($roll) ?: $roll ?>" readonly>
</div>
<div class="form-group">
<label for="email">Email address:</label>
<input type="email" class="form-control" placeholder="Enter email" id="email" name="email" required value="<?= ($user_email) ?: $user_email ?>" readonly>
</div>
<div class="form-group">
<label for="course">Courses Taken (all semesters):</label>
<input type="text" class="form-control" placeholder="Enter comma separated course codes ( eg: CS601,CS725 )" id="course" name="coursetaken" required>
</div>
<div class="form-group">
<label for="company">Company Name:</label>
<input type="text" class="form-control" placeholder="Enter company's official name" id="company" name="companyname" required>
</div>
<br>
<h5>Rounds provided by company:</h5>
<div class="custom-control custom-checkbox mb-3">
<input type="checkbox" class="custom-control-input" value="Written/Aptitude Round" id="written" name="roundprovided[]">
<label class="custom-control-label" for="written">Written/Aptitude Round</label>
</div>
<div class="custom-control custom-checkbox mb-3">
<input type="checkbox" class="custom-control-input" id="coding" name="roundprovided[]" value="Coding Round">
<label class="custom-control-label" for="coding">Coding Round</label>
</div>
<div class="custom-control custom-checkbox mb-3">
<input type="checkbox" class="custom-control-input" id="gd" name="roundprovided[]" value="Group Discussion">
<label class="custom-control-label" for="gd">Group Discussion</label>
</div>
<div class="custom-control custom-checkbox mb-3">
<input type="checkbox" class="custom-control-input" id="int1" name="roundprovided[]" value="1st Interview Round">
<label class="custom-control-label" for="int1">1st Interview Round</label>
</div>
<div class="custom-control custom-checkbox mb-3">
<input type="checkbox" class="custom-control-input" id="int2" name="roundprovided[]" value="2nd Interview (HR) Round">
<label class="custom-control-label" for="int2">2nd Interview (HR) Round</label>
</div>
<br>
<h5>Rounds you have cleared:</h5>
<div class="custom-control custom-checkbox mb-3">
<input type="checkbox" class="custom-control-input" id="written2" name="roundcleared[]" value="Written/Aptitude Round">
<label class="custom-control-label" for="written2">Written/Aptitude Round</label>
</div>
<div class="custom-control custom-checkbox mb-3">
<input type="checkbox" class="custom-control-input" id="coding2" name="roundcleared[]" value="Coding Round">
<label class="custom-control-label" for="coding2">Coding Round</label>
</div>
<div class="custom-control custom-checkbox mb-3">
<input type="checkbox" class="custom-control-input" id="gd2" name="roundcleared[]" value="Group Discussion">
<label class="custom-control-label" for="gd2">Group Discussion</label>
</div>
<div class="custom-control custom-checkbox mb-3">
<input type="checkbox" class="custom-control-input" id="int12" name="roundcleared[]" value="1st Interview Round">
<label class="custom-control-label" for="int12">1st Interview Round</label>
</div>
<div class="custom-control custom-checkbox mb-3">
<input type="checkbox" class="custom-control-input" id="int22" name="roundcleared[]" value="2nd Interview (HR) Round">
<label class="custom-control-label" for="int22">2nd Interview (HR) Round</label>
</div>
<br>
<div class="md-form mb-4 green-textarea active-green-textarea">
<label for="story">Your Story/Experience:</label>
<textarea id="story" class="md-textarea form-control" rows="12" placeholder="Please restrict yourself to 100 words . . ." name="story" required></textarea>
</div>
<input class="btn btn-primary" type="submit" name="submit" value="Submit">
</form>
</div>
</div>
</div>
<b><br>
<div class="footer">
<p style="color:#e88924">&#9400; Copyright@IITB</p>
</div>
<!-- Bootstrap scripts -->
<script src="https://code.jquery.com/jquery-3.2.1.slim.min.js" integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js" integrity="sha384-ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q" crossorigin="anonymous"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js" integrity="sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl" crossorigin="anonymous"></script>
<script type="text/javascript">
document.getElementById("logout").onclick = function () {
location.href = "logout.php";
};
</script>
</body>
</html>
<?php
}
else{
header("location: index.php");
}
?>