Links tonen per provincie
Tering, wat kut is dat zeg.
Dus, wat je ook kan doen, is wachten tot MYSQL het wel ondersteunt :P
Gewijzigd op 19/11/2010 17:39:14 door Pieter van Linschoten
Pieter van Linschoten op 19/11/2010 17:37:52:
Dat bedoel ik dus.
Ik denk dat je kunt gaan wachten tot je een ons weegt.
Ik wacht nog op antwoord van Noppes.
Code (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
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
<?php
ob_start();
mysql_connect("localhost", "root", "") or die(mysql_error());
mysql_select_db("provincies") or die(mysql_error());
$array = array('Groningen', 'Friesland', 'Drenthe', 'Overijssel', 'Flevoland', 'Gelderland', 'Utrecht', 'Noord-Holland', 'Zuid-Holland', 'Zeeland', 'Noord-Brabant', 'Limburg');
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Provincies en Leden</title>
</head>
<body>
<?php
foreach($array as $value) {
$query = mysql_query("SELECT * FROM infoprovincies WHERE provincie='".strtolower($value)."' LIMIT 1");
$query2 = mysql_query("SELECT * FROM infoprovincies WHERE provincie='".strtolower($value)."'");
while($row = mysql_fetch_assoc($query)) {
echo "<b>Er wonen ".mysql_num_rows($query2)." geregistreerde mensen in provincie ".$value.".</b><br>\n";
}
}
?>
<br>
<?php
if($_POST['registreer']) {
$provincie = $_POST['provincie'];
mysql_query("INSERT INTO infoprovincies VALUES ('".$provincie."')");
header("Location: index.php");
}
?>
<form action="" method="post">
<table>
<tr>
<td>Je woont in:</td>
<td>
<select name="provincie">
<?php
foreach($array as $value) {
$query = mysql_query("SELECT * FROM infoprovincies WHERE provincie='".strtolower($value)."'");
?>
<option value="<?php echo strtolower($value); ?>"><?php echo $value; ?></option>
<?php
}
?>
</select>
</td>
</tr>
<tr>
<td><input type="submit" name="registreer" value="Registreer"></td>
</tr>
</table>
</form>
</body>
</html>
ob_start();
mysql_connect("localhost", "root", "") or die(mysql_error());
mysql_select_db("provincies") or die(mysql_error());
$array = array('Groningen', 'Friesland', 'Drenthe', 'Overijssel', 'Flevoland', 'Gelderland', 'Utrecht', 'Noord-Holland', 'Zuid-Holland', 'Zeeland', 'Noord-Brabant', 'Limburg');
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Provincies en Leden</title>
</head>
<body>
<?php
foreach($array as $value) {
$query = mysql_query("SELECT * FROM infoprovincies WHERE provincie='".strtolower($value)."' LIMIT 1");
$query2 = mysql_query("SELECT * FROM infoprovincies WHERE provincie='".strtolower($value)."'");
while($row = mysql_fetch_assoc($query)) {
echo "<b>Er wonen ".mysql_num_rows($query2)." geregistreerde mensen in provincie ".$value.".</b><br>\n";
}
}
?>
<br>
<?php
if($_POST['registreer']) {
$provincie = $_POST['provincie'];
mysql_query("INSERT INTO infoprovincies VALUES ('".$provincie."')");
header("Location: index.php");
}
?>
<form action="" method="post">
<table>
<tr>
<td>Je woont in:</td>
<td>
<select name="provincie">
<?php
foreach($array as $value) {
$query = mysql_query("SELECT * FROM infoprovincies WHERE provincie='".strtolower($value)."'");
?>
<option value="<?php echo strtolower($value); ?>"><?php echo $value; ?></option>
<?php
}
?>
</select>
</td>
</tr>
<tr>
<td><input type="submit" name="registreer" value="Registreer"></td>
</tr>
</table>
</form>
</body>
</html>
Gnotrgnotr gnotrgnotr op 21/11/2010 11:50:19:
Ik heb net zoiets gemaakt:
Code (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
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
<?php
ob_start();
mysql_connect("localhost", "root", "") or die(mysql_error());
mysql_select_db("provincies") or die(mysql_error());
$array = array('Groningen', 'Friesland', 'Drenthe', 'Overijssel', 'Flevoland', 'Gelderland', 'Utrecht', 'Noord-Holland', 'Zuid-Holland', 'Zeeland', 'Noord-Brabant', 'Limburg');
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Provincies en Leden</title>
</head>
<body>
<?php
foreach($array as $value) {
$query = mysql_query("SELECT * FROM infoprovincies WHERE provincie='".strtolower($value)."' LIMIT 1");
$query2 = mysql_query("SELECT * FROM infoprovincies WHERE provincie='".strtolower($value)."'");
while($row = mysql_fetch_assoc($query)) {
echo "<b>Er wonen ".mysql_num_rows($query2)." geregistreerde mensen in provincie ".$value.".</b><br>\n";
}
}
?>
<br>
<?php
if($_POST['registreer']) {
$provincie = $_POST['provincie'];
mysql_query("INSERT INTO infoprovincies VALUES ('".$provincie."')");
header("Location: index.php");
}
?>
<form action="" method="post">
<table>
<tr>
<td>Je woont in:</td>
<td>
<select name="provincie">
<?php
foreach($array as $value) {
$query = mysql_query("SELECT * FROM infoprovincies WHERE provincie='".strtolower($value)."'");
?>
<option value="<?php echo strtolower($value); ?>"><?php echo $value; ?></option>
<?php
}
?>
</select>
</td>
</tr>
<tr>
<td><input type="submit" name="registreer" value="Registreer"></td>
</tr>
</table>
</form>
</body>
</html>
ob_start();
mysql_connect("localhost", "root", "") or die(mysql_error());
mysql_select_db("provincies") or die(mysql_error());
$array = array('Groningen', 'Friesland', 'Drenthe', 'Overijssel', 'Flevoland', 'Gelderland', 'Utrecht', 'Noord-Holland', 'Zuid-Holland', 'Zeeland', 'Noord-Brabant', 'Limburg');
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Provincies en Leden</title>
</head>
<body>
<?php
foreach($array as $value) {
$query = mysql_query("SELECT * FROM infoprovincies WHERE provincie='".strtolower($value)."' LIMIT 1");
$query2 = mysql_query("SELECT * FROM infoprovincies WHERE provincie='".strtolower($value)."'");
while($row = mysql_fetch_assoc($query)) {
echo "<b>Er wonen ".mysql_num_rows($query2)." geregistreerde mensen in provincie ".$value.".</b><br>\n";
}
}
?>
<br>
<?php
if($_POST['registreer']) {
$provincie = $_POST['provincie'];
mysql_query("INSERT INTO infoprovincies VALUES ('".$provincie."')");
header("Location: index.php");
}
?>
<form action="" method="post">
<table>
<tr>
<td>Je woont in:</td>
<td>
<select name="provincie">
<?php
foreach($array as $value) {
$query = mysql_query("SELECT * FROM infoprovincies WHERE provincie='".strtolower($value)."'");
?>
<option value="<?php echo strtolower($value); ?>"><?php echo $value; ?></option>
<?php
}
?>
</select>
</td>
</tr>
<tr>
<td><input type="submit" name="registreer" value="Registreer"></td>
</tr>
</table>
</form>
</body>
</html>
WTF stelt deze onzin voor?
Ik wacht nog steeds op antwoord van Noppes.