-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsession.php
More file actions
47 lines (40 loc) · 881 Bytes
/
session.php
File metadata and controls
47 lines (40 loc) · 881 Bytes
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
<?php
session_start();
if(isset($_POST['submit']))
{
$Name = $_POST['txtname'];
$Pass = $_POST['txtpass'];
if($Name=="satyam" && $Pass=="123")
{
$_SESSION['username']= $Name;
header("location:session1.php");
}
else
{
echo "Worng Username and password";
}
}
?>
<html>
<head> <title>use of session</title></head>
<body>
<center>
<form name="Form1" method="POST" action="">
<h1> Session </h1>
<table>
<tr>
<td>Enter User Name: </td>
<td> <input type="text" name="txtname" required> </td>
</tr>
<tr>
<td>Enter Password: </td>
<td> <input type="password" name="txtpass" required> </td>
</tr>
<tr>
<td> <input type="submit" name="submit" value="submit"> </td>
</tr>
</table>
</form>
</center>
</body>
</html>