-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathphp_24.php
More file actions
44 lines (36 loc) · 825 Bytes
/
Copy pathphp_24.php
File metadata and controls
44 lines (36 loc) · 825 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
<!DOCTYPE html>
<html lang="en">
<head>
<title>Llistat de socis</title>
</head>
<body>
<h1> Llistat de socis </h1>
<form>
<input type="Submit" name="Individual" value="Individual">
<input type="Submit" name="Familiar" value="Familiar">
<input type="Submit" name="Infantil" value="Infantil">
<input type="Submit" name="Localitat" value="Localitat">
</form>
<?php
$myFile = "socis.txt";
$lines = file($myFile);//file in to an array
foreach($lines as $line)
{
$var = explode(' ', $line, 2);
$newData=explode(" ",$line);
if (isset($_GET['Individual'])){
echo $newData[0]."<br>";
}
if (isset($_GET['Familiar'])){
echo $newData[1]."<br>";
}
if (isset($_GET['Infantil'])){
echo $newData[2]."<br>";
}
if (isset($_GET['Localitat'])){
echo $newData[3]."<br>";
}
}
?>
</body>
</html>