17 if(isset($_SESSION[
'loggedin']))
20 $servername =
"localhost";
25 $db = mysqli_connect($servername, $username, $pass, $dbname);
29 die(
"Connection failed: " . mysqli_connect_error());
36 <title>PlacementExperience | Profile</title>
38 <meta charset=
"utf-8">
39 <meta name=
"viewport" content=
"width=device-width, initial-scale=1, shrink-to-fit=no">
40 <link rel=
"stylesheet" href=
"https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity=
"sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin=
"anonymous">
43 <link href=
"https://fonts.googleapis.com/css2?family=Montserrat:wght@700&display=swap" rel=
"stylesheet">
44 <link href=
"https://fonts.googleapis.com/css2?family=Nunito:wght@800&family=Roboto+Mono&display=swap" rel=
"stylesheet">
45 <link href=
"https://fonts.googleapis.com/css2?family=Montserrat:wght@500&display=swap" rel=
"stylesheet">
47 <link rel=
"stylesheet" href=
"https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
49 <link rel=
"stylesheet" type=
"text/css" href=
"css/style.css">
50 <link rel=
"stylesheet" href=
"css/style_yourpost.css">
52 <script type=
"text/javascript">
56 function confirmationDelete(anchor)
58 var conf = confirm(
'Are you sure want to delete this record?');
60 window.location=anchor.attr(
"href");
69 <div
class=
"col-sm-3" style=
"left:0px;">
70 <div
class=
"container-fluid sidenav">
71 <a href=
"mainpage.php"><img src=
"img/logoo.png" style=
"width:100px; margin-top:15px;"></a>
75 <a style=
"text-decoration: none;" href=
"https://www.cse.iitb.ac.in" target=
"_blank">
76 <h6 style=
"text-align: center;">Department of</h6>
77 <h6 style=
"text-align: center;">Computer Science and Engineering</h6>
78 <h5 style=
"text-align: center;">IIT Bombay</h5>
83 <li><a href=
"mainpage.php"> HOME </a></li>
84 <li><a href=
"posts.php"> POSTS </a></li>
85 <li><a href=
"exp_form.php">SHARE</a></li>
86 <li><a href=
"profile.php"> PROFILE </a></li>
90 <h5>Important Links</h5>
92 <li style=
"font-size:10px;"><a href=
"http://www.iitb.ac.in/" target=_blank> IITB Home</a></li>
93 <li style=
"font-size:10px;"><a href=
"https://www.cse.iitb.ac.in/"> CSE@IITB </a></li>
94 <li style=
"font-size:10px;"><a href=
"https://asc.iitb.ac.in/"> ASC </a></li>
101 <div
class=
"container-fluid col-md-8 whole" style=
"margin-top:0px;">
104 <div
class=
"col-sm-8 main" id=
"title">
105 <img src=
"img/heading_trans.png" alt=
"placementExperience" style=
"align-content: center; margin-left: 25%; margin-right: 25%;">
107 <div
class=
"col-sm-4" style=
"left:0px; padding-top:20px; vertical-align: center;">
108 <button
id=
"logout" type=
"button" class=
"btn btn-info btn-round" style=
"float:right;">
111 <a href=
"profile.php"><i
class=
"fa fa-user-circle-o" style=
"font-size:36px; float:right; padding-right:10px;" ></i></a>
115 <hr
class=
"lineform">
116 <h3 style=
"color: #e67f11">Profile</h3><br>
119 $user_email = $_SESSION[
'Logged_email'];
121 $sql_smt=
"SELECT name, roll, email, branch FROM student WHERE email = '$user_email' ";
123 $result = mysqli_query($db, $sql_smt);
125 if (mysqli_num_rows($result) > 0) {
126 $row = mysqli_fetch_assoc($result)
136 <?php echo
'<td>'.$row[
'name'].
'</td>'; ?>
137 <?php echo
'<td>' .$row[
'roll'].
'</td>'; ?>
138 <?php echo
'<td>' .$row[
'branch'].
'</td>'; ?>
139 <?php echo
'<td>' .$row[
'email'].
'</td>';
150 <h3 style=
"color: #e67f11"> Your Posts : </h3>
161 $user_email = $_SESSION[
'Logged_email'];
162 $sql_smt=
"SELECT id, companyname, created_at FROM posts WHERE email = '$user_email' ORDER BY created_at DESC";
164 $result = mysqli_query($db, $sql_smt);
166 if (mysqli_num_rows($result) > 0) {
167 while($row = mysqli_fetch_assoc($result)) {
169 echo
'<td>'.$row[
'companyname'].
'</td>';
170 echo
'<td>'.date(
'jS M Y', strtotime($row[
'created_at'])).
'</td>';
176 <button
class=
"editbtn"><a href=
"edit_exp.php?id=<?= $row['id']; ?>">Edit</a></button>
179 <button
class=
"delbtn"><a onclick=
'javascript:confirmationDelete($(this));return false;' href=
"delpost.php?id=<?= $row['id']; ?>">Delete</a></button>
191 <button
class=
"editbtn"><a href=
"exp_form.php">Add New Experience</a></button>
199 <p style=
"color:#e88924">Ⓒ Copyright@IITB</p>
202 <!-- Bootstrap scripts -->
204 <script src=
"https://code.jquery.com/jquery-3.2.1.slim.min.js" integrity=
"sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN" crossorigin=
"anonymous"></script>
205 <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>
206 <script src=
"https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js" integrity=
"sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl" crossorigin=
"anonymous"></script>
208 <script type=
"text/javascript">
209 document.getElementById(
"logout").onclick =
function () {
210 location.href =
"logout.php";
224 header(
"location: index.php");