-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathphp_25.php
More file actions
45 lines (33 loc) · 966 Bytes
/
Copy pathphp_25.php
File metadata and controls
45 lines (33 loc) · 966 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
<!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">
<input type="text" id="myInput" onkeyup="myFunction()" placeholder="Filtra per localitat...">
</form>
<?php
$myFile = "socis.txt";
$lines = file($myFile);//file in to an array
foreach($lines as $line) {
$var = explode(' ', $line, 1);
$newData=explode(" ",$line);
echo "<table border=\"1\" width=\100px\">";
for ($n1=0;$n1<1;$n1++){
echo "<tr>";
for ($n2=0;$n2<=3;$n2++){
echo "<td width='100'>$newData[$n2]</td>";
}
}
echo "</tr>";
echo "</table>";
}
?>
</body>
</html>