@ 2017-07-07T08:12:13Z <?php
<?php
include("connect.php");
include("functions.php");
// define variables and set to empty values
$nameErr = $sexErr = $designationErr = $departmentErr = $instituteErr = $staeErr = $countryErr = $mobilenoErr = $officenoErr = $residencenoErr = $email = "";
$name = $sex = $designation = $department = $institute = $state = $country = $mobileno = $officeno = $residenceno = $email = "";
if ($_SERVER["REQUEST_METHOD"] == "POST") {
if (empty($_POST["name"])) {
$nameErr = "Name is required";
}
else {
$name = test_input($_POST["name"]);
}
if (empty($_POST["sex"])) {
$genderErr = "Gender is required";
}else {
$gender = test_input($_POST["sex"]);
}
}
if ($_SERVER["REQUEST_METHOD"] == "POST") {
if (empty($_POST["designation"])) {
$designationErr = "required";
}else {
$designation = test_input($_POST["designation"]);
}
if ($_SERVER["REQUEST_METHOD"] == "POST") {
if (empty($_POST["department"])) {
$departmentErr = "required";
}else {
$department = test_input($_POST["department"]);
}
if ($_SERVER["REQUEST_METHOD"] == "POST") {
if (empty($_POST["institute"])) {
$instituteeErr = "required";
}else {
$institute = test_input($_POST["institute"]);
}
if (empty($_POST["city"])) {
$city = "";
}else {
$city = test_input($_POST["city"]);
}
if (empty($_POST["state"])) {
$stateErr = "required";
}else {
$state = test_input($_POST["state"]);
}
if (empty($_POST["country"])) {
$countryErr = "required";
}else {
$country = test_input($_POST["country"]);
}
if (empty($_POST["pincode"])) {
$pincode = "";
}else {
$pincode = test_input($_POST["pincode"]);
}
if (empty($_POST["OfficeNo"])) {
$OfficeNo = "";
}else {
$OfficeNo = test_input($_POST["officeNo"]);
}
if (empty($_POST["residenceNo"])) {
$residenceNo = "";
}else {
$residenceNo = test_input($_POST["ResidenceNo"]);
}
if ($_SERVER["REQUEST_METHOD"] == "POST") {
if (empty($_POST["MobileNo"])) {
$MobileNoErr = "required";
}else {
$MobileNo = test_input($_POST["MobileNo"]);
}
if (empty($_POST["email"])) {
$emailErr = "Email is required";
}else {
$email = test_input($_POST["email"]);
// check if e-mail address is well-formed
if (!filter_var($email, FILTER_VALIDATE_EMAIL)) {
$emailErr = "Invalid email format";
}
}
$insertQuery = "INSERT INTO Personal_info(userName, sex, designation, department, institute, city, state, country, pin_code, office_no., residence_no., mobile_no., email_id.) VALUES ('$name', '$sex', '$designation', '$department', '$institute','$city', '$state', '$country', '$pincode', '$officeno', '$residenceno', '$mobileno', '$email')";
if(mysqli_query($con, $insertQuery)) {
echo "New record created successfully";
} else {
echo "not register";
}
}
}
}
}
function test_input($data) {
$data = trim($data);
$data = stripslashes($data);
$data = htmlspecialchars($data);
return $data;
}
?>
<!doctype html>
<html>
<head>
<title>Registration Form</title>
</head>
<body bgcolor="#FFFFFF">
<form name="name" action="" onsubmit="return validate_form();" method="post">
<table align="center" width=40% width="100%" cellspacing="2" cellpadding="2" border="5">
<tr>
<td colspan="7" align="center"><b>Employee Registration Form.</b></td>
</tr>
<tr>
<td align="left" valign="top" width="30%">Name<span style="color:red">*</span></td>
<td width="57%"><select name="mydropdown">
<option value="Default">Default</option>
<option value="Professor">Professor</option>
<option value="Doctor">Doctor</option>
<option value="Mr">Mr</option>
<option value="Miss">Miss</option>
<option value="Mrs">Mrs</option>
</select>
<td width="57%"><input type="text" value="" name="name" size="30"></td>
</tr></td>
<tr>
<td align="left" valign="top" width="41%">Sex<span style="color:red">*</span></td>
<td width="57%">
<input type="text" value="" name="sex" onkeypress="return isNumberKey(event)" size="24"></td>
</tr>
<tr>
<td align="left" valign="top" width="41%">Designation<span style="color:red">*</span></td>
<td width="57%">
<input type="text" value="" name="designation" onkeypress="return isNumberKey(event)" size="24"></td>
</tr>
<tr>
<td align="left" valign="top" width="41%">Department<span style="color:red">*</span></td>
<td width="57%">
<input type="text" value="" name="department" onkeypress="return isNumberKey(event)" size="24"></td>
</tr>
<tr>
<td align="left" valign="top" width="41%">Institute<span style="color:red">*</span></td>
<td width="57%">
<input type="text" value="" name="institute" onkeypress="return isNumberKey(event)" size="24"></td>
</tr>
<!--<tr>
<td align="left" valign="top" width="41%">Employee Number<span style="color:red">*</span></td>
<td width="57%">
<input type="text" value="" name="num" onkeypress="return isNumberKey(event)" size="24"></td>
</tr>-->
<tr>
<td align="left" valign="top" width="41%">City</td>
<td width="57%"><textarea rows="1" maxlen="100" name="city" cols="20"></textarea></td>
<td align="left" valign="top" width="41%">State</td>
<td width="57%"><textarea rows="1" maxlen="100" name="state" cols="20"></textarea></td>
<tr> <td align="left" valign="top" width="41%">Country</td>
<td width="57%"><textarea rows="1" maxlen="100" name="country" cols="20"></textarea></td>
<td align="left" valign="top" width="41%">Pincode</td>
<td width="57%"><textarea rows="1" maxlen="100" name="pincode" cols="20"></textarea></td>
</tr>
</tr>
<tr>
<td align="left" valign="top" width="41%">OfficeNo.</td>
<td width="57%">
<input type="text" value="" onkeypress="return isNumberKey(event)" name="officeno" size="24"></td>
<td align="left" valign="top" width="41%">ResidenceNo.</td>
<td width="57%">
<input type="text" value="" onkeypress="return isNumberKey(event)" name="residenceno" size="24"></td>
</tr>
<tr>
<td align="left" valign="top" width="41%">MobileNo.</td>
<td width="57%">
<input type="text" value="" onkeypress="return isNumberKey(event)" name="mobileno" size="24"></td>
</tr>
<!--<td align="left" valign="top" width="41%">Designation:</td>
<td width="57%">
<input type="text" value="" onkeypress="return isNumberKey(event)" name="txtFName1" size="24"></td>
</tr>
<tr>
<td align="left" valign="top" width="41%">Job Location</td>
<td width="57%"><select name="mydropdown">
<option value="Default">Default</option>
<option value="Chennai">Chennai</option>
<option value="Bangalore">Bangalore</option>
<option value="Chennai">Pune</option>
<option value="Bangalore">Mysore</option>
<option value="Chennai">Chandigarh</option>
</select></td>
</tr>
<tr>
<td align="left" valign="top" width="41%">Designation</td>
<td width="57%">
<select name="mydropdown">
<option value="Default">Default</option>
<option value="Systems Engineer">Systems Engineer</option>
<option value="Senior Systems Engineer">Senior Systems Engineer</option>
<option value="Technology Analyst">Technology Analyst</option>
<option value="Technology Lead">Technology Lead</option>
<option value="Project Manager">Project Manager</option>
</select></td>
</tr>-->
<tr>
<td align="left" valign="top" width="41%">email<span style="color:red">*</span></td>
<td width="57%">
<input type="text" value="" name="email" size="24"></td>
</tr>
<tr>
<td colspan="2">
<p align="center">
<input type="submit" value=" Submit" name="B4">
<input type="reset" value=" Reset All " name="B5"></td>
<a href="step2.php" style="float:right; padding:10px; margin-right:40px; background-color:#eee; color:#333; text-decoration:none;">Next</a>
</tr>
</table>
</form>
</body>
</html>
Enable javascript to submit You have javascript disabled. You will not be able to edit any code.
Here you find the average performance (time & memory) of each version. A grayed out version indicates it didn't complete successfully (based on exit-code).
Version System time (s) User time (s) Memory (MiB) 7.1.7 0.006 0.010 16.90 7.1.6 0.023 0.017 35.18 7.1.5 0.020 0.018 34.81 7.1.4 0.013 0.023 34.18 7.1.3 0.021 0.015 34.35 7.1.2 0.017 0.013 34.52 7.1.1 0.007 0.011 16.29 7.1.0 0.007 0.009 16.38 7.0.20 0.005 0.013 16.75 7.0.19 0.001 0.018 16.67 7.0.18 0.009 0.009 15.96 7.0.17 0.008 0.008 16.09 7.0.16 0.009 0.009 16.30 7.0.15 0.003 0.013 16.15 7.0.14 0.003 0.014 16.06 7.0.13 0.003 0.015 16.24 7.0.12 0.012 0.008 16.22 7.0.11 0.010 0.006 16.09 7.0.10 0.006 0.008 16.02 7.0.9 0.003 0.013 15.98 7.0.8 0.006 0.009 16.21 7.0.7 0.009 0.010 16.07 7.0.6 0.008 0.010 16.08 7.0.5 0.008 0.010 15.94 7.0.4 0.003 0.013 16.34 7.0.3 0.005 0.012 16.38 7.0.2 0.005 0.012 16.19 7.0.1 0.008 0.008 16.20 7.0.0 0.006 0.012 16.27
preferences:dark mode live preview
140.45 ms | 1394 KiB | 7 Q