-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathadd-experience.php
194 lines (141 loc) · 5.38 KB
/
add-experience.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
<?php
session_start();
//Database Configuration File
include('includes/config.php');
//error_reporting(0);
//verifying Session
if(strlen($_SESSION['jsid'])==0)
{
header('location:logout.php');
}
else{
if(isset($_POST['submit']))
{
//Getting Post Values
$employername=$_POST['employername'];
$toe=$_POST['toe'];
$desi=$_POST['designation'];
$ctc=$_POST['ctc'];
$fdate=$_POST['fdate'];
$tdate=$_POST['tdate'];
$skills=$_POST['skills'];
//Getting User Id
$uid=$_SESSION['jsid'];
$sql="insert into tblexperience(UserID,EmployerName,EmployementType,Designation,Ctc,FromDate,ToDate)values(:uid,:employername,:toe,:desi,:ctc,:fdate,:tdate)";
$query = $dbh->prepare($sql);
// Binding Post Values
$query-> bindParam(':employername', $employername, PDO::PARAM_STR);
$query-> bindParam(':uid', $uid, PDO::PARAM_STR);
$query->bindParam(':toe',$toe,PDO::PARAM_STR);
$query->bindParam(':desi',$desi,PDO::PARAM_STR);
$query->bindParam(':ctc',$ctc,PDO::PARAM_STR);
$query->bindParam(':fdate',$fdate,PDO::PARAM_STR);
$query->bindParam(':tdate',$tdate,PDO::PARAM_STR);
$query->execute();
$LastInsertId=$dbh->lastInsertId();
if ($LastInsertId>0) {
echo '<script>alert("experience details has been added.")</script>';
echo "<script>window.location.href ='my-profile.php'</script>";
}
else
{
echo '<script>alert("Something Went Wrong. Please try again")</script>';
}
}
?>
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>User | Add Experience Details</title>
<link href="css/custom.css" rel="stylesheet" type="text/css">
<link href="css/bootstrap.css" rel="stylesheet" type="text/css">
<link href="css/color.css" rel="stylesheet" type="text/css">
<link href="css/responsive.css" rel="stylesheet" type="text/css">
<link href="css/owl.carousel.css" rel="stylesheet" type="text/css">
<link href="css/font-awesome.min.css" rel="stylesheet" type="text/css">
<link href="css/editor.css" type="text/css" rel="stylesheet"/>
<link href="css/jquery.mCustomScrollbar.css" rel="stylesheet" type="text/css">
<link href='https://fonts.googleapis.com/css?family=Roboto:400,300,300italic,500,700,900' rel='stylesheet' type='text/css'>
<script src="http://js.nicedit.com/nicEdit-latest.js" type="text/javascript"></script>
<script type="text/javascript">bkLib.onDomLoaded(nicEditors.allTextAreas);</script>
</head>
<body class="theme-style-1">
<div id="wrapper">
<!--HEADER START-->
<?php include('includes/header.php');?>
<!--HEADER END-->
<!--INNER BANNER START-->
<section id="inner-banner">
<div class="container">
<h1>User Experience Details</h1>
</div>
</section>
<!--INNER BANNER END-->
<!--MAIN START-->
<div id="main">
<!--Signup FORM START-->
<form name="" enctype="multipart/form-data" method="post">
<section class="resum-form padd-tb">
<div class="container">
<!--Success and error message -->
<?php if(@$error){ ?><div class="errorWrap">
<strong>ERROR</strong> : <?php echo htmlentities($error);?></div><?php } ?>
<?php if(@$msg){ ?><div class="succMsg">
<strong>Success</strong> : <?php echo htmlentities($msg);?></div><?php } ?>
<div class="row">
<div class="col-md-6 col-sm-6">
<label>Employer Name *</label>
<input type="text" name="employername" placeholder="Name of Employer" required="true" autocomplete="off" value="" class="form-control">
</div>
<div class="col-md-6 col-sm-6">
<label>Type of Employment *</label>
<input type="text" name="toe" required="true" placeholder="eg fulltime,parttime etc" autocomplete="off" value="" class="form-control">
</div>
<div class="col-md-6 col-sm-6">
<label>Designation</label>
<input type="text" name="designation" placeholder="Enter Designation" autocomplete="off" value="" required="true" class="form-control">
<label>CTC(per month)</label>
<input type="text" name="ctc" autocomplete="off" placeholder="Enter CTC" value="" class="form-control" pattern="[0-9]+">
</div>
<div class="col-md-6 col-sm-6">
<label>From Date</label>
<input type="date" name="fdate" autocomplete="off" value="" class="form-control">
</div>
<div class="col-md-6 col-sm-6">
<label>To Date</label>
<input type="date" name="tdate" autocomplete="off" value="" class="form-control">
</div>
</div>
<div class="col-md-12">
<div class="btn-col">
<input type="submit" name="submit" value="Add">
</div>
</div>
</div>
</div>
</section>
</form>
<!--RESUME FORM END-->
</div>
<!--MAIN END-->
<!--FOOTER START-->
<?php include('includes/footer.php');?>
<!--FOOTER END-->
</div>
<script src="js/jquery-1.11.3.min.js"></script>
<script src="js/bootstrap.min.js"></script>
<script src="js/owl.carousel.min.js"></script>
<script src="js/jquery.velocity.min.js"></script>
<script src="js/jquery.kenburnsy.js"></script>
<script src="js/jquery.mCustomScrollbar.concat.min.js"></script>
<script src="js/editor.js"></script>
<script src="js/jquery.accordion.js"></script>
<script src="js/jquery.noconflict.js"></script>
<script src="js/theme-scripts.js"></script>
<script src="js/custom.js"></script>
</body>
</html>
<?php }
?>