-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathwelcomestudent.php
55 lines (44 loc) · 1022 Bytes
/
welcomestudent.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
<?php
session_start();
if(isset($_SESSION['studentID']))
{
echo"YOU HAVE SUCCESSFULLY LOGGED IN";
echo $_SESSION['studentID'];
echo"<a href='logoutstudent.php'>LOGOUT";
}
else
{
header("location:formstudent.php");
}
?>
<html>
<body background="C:\Users\Amisha\Desktop\webD\dpm10.jpg">
<form method="POST" action="welcomestudent.php"><br>
<select name="formGender"><br>
<option value="">Select...</option>
<option value="M">MATHS</option>
<option value="P">PHYSICS</option>
<option value="C">CHEMISTRY</option>
<option value="N">NETWORKING</option>
</select>
<input type="submit" value="submit here"><br>
</body>
</form>
</html>
<?php
$varGender = $_POST['formGender'];
if($varGender=="M")
{echo"<a href='showstudent.php'>Click here";
}
else if($varGender=="P")
{
echo"<a href='showstudent.php'>Click here";
}
else if($varGender=="C")
{
echo"<a href='showstudent.php'>Click here";}
else if($varGender=="N")
{
echo"<a href='showstudent.php'>Click here";
}
?>