Permalink
Cannot retrieve contributors at this time
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
ABC_Air_Service/user.php
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
77 lines (67 sloc)
2.86 KB
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//Connecting the database to the webpage | |
include 'connect1.php'; | |
if(isset($_POST['submit'])){ | |
$date = date('Y-m-d', strtotime($_POST['date'])); | |
$name=$_POST['name']; | |
$engg=$_POST['engg']; | |
$fhr=$_POST['fhr']; | |
$fno=$_POST['fno']; | |
$date=$_POST['date']; | |
$sql="insert into `crud` (name,engg,fhr,fno,date) values('$name','$engg','$fhr','$fno','$date')"; | |
$result=mysqli_query($con,$sql); | |
if($result){ | |
//echo "Data inserted successfully"; | |
header('location:display.php'); | |
}else{ | |
die(mysqli_error($con)); | |
} | |
} | |
?> | |
<!doctype html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css" rel="stylesheet"> | |
<br> | |
<title>ABC Air Services</title> | |
</head> | |
<body background="https://images.hdqwalls.com/download/view-outside-airplane-qa-1920x1080.jpg" background-size="no-repeat center center fixed;"> | |
<h2 class="text-center mt-4" style="color:white;"><b>Create The Airframe</b></h2> | |
<h2 class="text-center mt-3" style="color:white;"><b>Fill the necessary details</b></h2> | |
<div class="container my-4"> | |
<form method="post"> | |
<div class="mb-3"> | |
<label style="color:white;"><b>Maintenance task</b></label> | |
<input type="text" class="form-control" placeholder="Enter Name of Maintenance" name="name" autocomplete="off"> | |
</div> | |
<div class="mb-3"> | |
<label style="color:white;"><b>Engineer Assigned</b></label> | |
<select id="engg" name="engg" placeholder="Select Engineer" class="form-control"> | |
<option value="Aircraft Maintenance Engineer">Aircraft Maintenance Engineer (AME)</option> | |
<option value="Aircraft Maintenance Technician">Aircraft Maintenance Technician (AMT)</option> | |
<option value="Aircraft Maintenance Mechanic">Aircraft Maintenance Mechanic (AMM)</option> | |
</select> | |
<!--<input type="text" class="form-control" placeholder="Enter Name of Engineer" name="engg" autocomplete="off">--> | |
</div> | |
<div class="mb-3"> | |
<label style="color:black;"><b>Flight Hours</b></label> | |
<input type="text" class="form-control" placeholder="Enter number of Flight Hours" name="fhr" autocomplete="off"> | |
</div> | |
<div class="mb-3"> | |
<label style="color:black;"><b>Flight Number</b></label> | |
<input type="text" class="form-control" placeholder="Enter Flight Number" name="fno" autocomplete="off"> | |
</div> | |
<div class="mb-3"> | |
<label style="color:black;"><b>Schedule Date</b></label> | |
<input type="date" class="form-control" placeholder="Enter scheduled date for maintenance" name="date" autocomplete="off"> | |
</div> | |
<center><button type="submit" class="btn btn-dark" name="submit">Submit</button> | |
<button class="btn btn-dark my-3"><a href="display.php" class="text-light" style="text-decoration: none;">Airframe Dashboard</a> | |
</button> | |
</center> | |
</form> | |
</div> | |
</body> | |
</html> |