-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathphp_37A.php
More file actions
68 lines (45 loc) · 1.09 KB
/
Copy pathphp_37A.php
File metadata and controls
68 lines (45 loc) · 1.09 KB
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
68
<!DOCTYPE html>
<html lang="en">
<head>
<title>Opció</title>
</head>
<body>
<form method="post" action="php_37A.php">
<select name="Opcio">
<option value="Google">Google</option>
<option value="Generalitat">Generalitat</option>
<option value="Paeria">Paeria</option>
<option value="Universitat">Universitat</option>
</select>
<input type="submit" value="Anar"/>
</form>
<?php
session_start();
if (isset($_POST['Opcio'])){
$Opcio=$_POST['Opcio'];
if ($Opcio=="Google"){
header('Location:https://www.google.cat/');
exit;
}
if ($Opcio=="Generalitat"){
header('Location:https://web.gencat.cat/');
exit;
}
if ($Opcio=="Paeria"){
header('Location:https://www.paeria.es/');
exit;
}
if ($Opcio=="Universitat"){
header('Location:https://www.udl.cat/');
exit;
}
}
else {
$Opcio=" ";
}
$_SESSION['Opcio'] = $Opcio;
$ara=getdate();
$_SESSION=$ara;
?>
</body>
</html>