-
Notifications
You must be signed in to change notification settings - Fork 0
/
insert_into_train_2.php
35 lines (25 loc) · 1.03 KB
/
insert_into_train_2.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
<html>
<head>
<title>RAILWAY RESERVATION SYSTEM</title>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css" integrity="sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf23Q9Ifjh" crossorigin="anonymous">
<link rel="stylesheet" href="index.css">
</head>
<body class=home>
<div id="container">
<nav class="navbar navbar-expand-lg navbar-dark bg-black">
<a class="navbar-brand" id="n">Railway Management System</a>
</nav>
</div>
<?php
require "db.php";
$sql = "INSERT INTO train (tname,sp,st,dp,dt,dd) VALUES ('".$_POST["tname"]."','".$_POST["sp"]."','".$_POST["st"]."','".$_POST["dp"]."','".$_POST["dt"]."','".$_POST["dd"]."')";
if ($conn->query($sql) === TRUE) {
echo "New record created successfully";
} else {
echo "Error: " . $sql . "<br>" . $conn->error;
}
echo "<br> <a href=\"http://localhost/railway/admin_login_1.php\">Go Back to Admin Menu!!!</a> ";
$conn->close();
?>
</body>
</html>