-
Notifications
You must be signed in to change notification settings - Fork 51
/
resvn.php
67 lines (50 loc) · 1.64 KB
/
resvn.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
<html>
<body style=" background-image: url(pnglogin.jpg);
height: 100%;
background-position: center;
background-repeat: no-repeat;
background-size: cover;" >
<form action="new_png.php" method="post">
<?php
session_start();
require "db.php";
if ($conn->connect_error)
{
die("Connection failed: " . $conn->connect_error);
}
$mobile=$_POST["mno"];
$pwd=$_POST["password"];
$query = mysqli_query($conn,"SELECT * FROM user WHERE user.mobileno=$mobile AND user.password='".$pwd."' ") or die(mysql_error());
if(mysqli_num_rows($query) == 0)
{
echo "No such login !!! <br> ";
echo " <br><a href=\"http://localhost/railway/enquiry_result.php\">Go Back!!!</a> <br>";
die();
}
$row = mysqli_fetch_array($query);
$temp=$row['id'];
//echo $temp;
//echo $_SESSION["doj"];
$_SESSION["id"] = "$temp";
$tno=$_POST["tno"];
$_SESSION["tno"] = "$tno";
$class=$_POST["class"];
$_SESSION["class"] = "$class";
$nos=$_POST["nos"];
$_SESSION["nos"] = "$nos";
echo "<table>";
for($i=0;$i<$nos;$i++)
{
echo "<tr><td><input type='text' name='pname[]' placeholder=\"Passenger Name\" required></td><br> ";
echo "<td><input type='text' name='page[]' placeholder=\"Passenger Age\" required></td><br>";
echo "<td><input type='text' name='pgender[]' placeholder=\"Passenger Gender\" required></td></tr><br> ";
}
echo "</table>";
//Enter Train No: <input type="text" name="tno" required><br>
//Enter Class: <input type="text" name="class" required><br>
echo "<a href=\"http://localhost/railway/enquiry.php\">Back to Enquiry</a>";
$conn->close();
?>
<br><br><input type="submit" value="Book">
</body>
</html>