Oproepen
Jullie denken dat dit weer zelfde topic is, dan de vorige, dat is niet zo.
Ik heb dus me eigen voetbalgame, en zat met een probleem dat mensen automatish alle spelers in hun profiel moeten hebben.
Ik heb al jullie advies opgevolgt en nu een tabel gemaakt met spelers.
Nu is mijn vraag:
Kunnen jullie een voorbeeldje maken van het volgende:
Dat als mensen Ajax kiezen, dat ze dan de spelers van ajax in profiel hebben. En als ze PSV kiezen, alle spelers van psv in profiel hebben, enzovoort, enzovoort.
Ik heb al gemaakt dat je een club kan kiezen en dat die automatish in je profiel komt te staan. Maar nu Moeten dus de spelers ook van je club in je profiel staan.
Om duidelijk te maken van wat ik al heb:
Screenshot van Spelers, Ik heb er nu nog maar 1 in staan als proef.
www.nicro.nl/screen1.gif
Script van kieseenclub.php
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
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
<?php
include('include/header.php');
echo 'Kier hieronder u club:';
$iSelect = mysql_query("SELECT club,gekozen FROM clubs WHERE gekozen='0'")
or die ( mysql_error () );
echo '<form method="post" action="">
<select name=cluppie>';
while($iList = mysql_fetch_assoc($iSelect)){
echo '<option value="'. $iList['club'] .'"> '. $iList['club'] .' </option>';
}
echo '<input type=submit name=knop value="Kies!"></select></form>';
if($_POST['knop']){
echo ' Gefeliciteerd, je bent coach geworden van '.$_POST['cluppie'].'. <meta http-equiv="refresh" content="2;URL=index.php" />';
mysql_query("UPDATE clubs SET gekozen='1' WHERE club='".$_POST['cluppie']."'")
or die ( mysql_error () );
mysql_query("UPDATE inlog SET Club='".$_POST['cluppie']."'")
or die ( mysql_error () );
}
include('include/footer.php');
?>
include('include/header.php');
echo 'Kier hieronder u club:';
$iSelect = mysql_query("SELECT club,gekozen FROM clubs WHERE gekozen='0'")
or die ( mysql_error () );
echo '<form method="post" action="">
<select name=cluppie>';
while($iList = mysql_fetch_assoc($iSelect)){
echo '<option value="'. $iList['club'] .'"> '. $iList['club'] .' </option>';
}
echo '<input type=submit name=knop value="Kies!"></select></form>';
if($_POST['knop']){
echo ' Gefeliciteerd, je bent coach geworden van '.$_POST['cluppie'].'. <meta http-equiv="refresh" content="2;URL=index.php" />';
mysql_query("UPDATE clubs SET gekozen='1' WHERE club='".$_POST['cluppie']."'")
or die ( mysql_error () );
mysql_query("UPDATE inlog SET Club='".$_POST['cluppie']."'")
or die ( mysql_error () );
}
include('include/footer.php');
?>
Groot script van profiel.php:
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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
<?php
include('include/header.php');
if($inlog == 'true'){
echo '<table width="100%" border="0" cellpadding="2" cellspacing="0" color="000000">';
echo '<tr>';
$sql = 'SELECT * FROM inlog WHERE ID="'.$_COOKIE['ID'].'" AND hash="'.$_COOKIE['hash'].'"';
$res = mysql_query($sql) OR die (mysql_error());
while($rij = mysql_fetch_assoc($res)){
if($rij['ava'] != ""){
echo '<td valign="top">';
echo '<table cellpadding="0" cellspacing="0" border="0">';
echo '<tr>';
echo '<td><img src="images/menu_01.gif"></td>';
echo '<td background="images/menu_02.gif"><div id="login"><b>Avater</b></div></td>';
echo '<td><img src="images/menu_03.gif"></td>';
echo '</tr>';
echo '<tr>';
echo '<td background="images/menu_04.gif"></td>';
echo '<td background="images/menu_05.gif"><img src="'.$rij['ava'].'"></td>';
echo '<td background="images/menu_06.gif"></td>';
echo '</tr>';
echo '<tr>';
echo '<td><img src="images/menu_07.gif"></td>';
echo '<td background="images/menu_08.gif"></td>';
echo '<td><img src="images/menu_09.gif"></td>';
echo '</tr>';
echo '</table>';
echo '</td>';
}
}
echo '<td valign="top" width="100%">';
echo '<table cellpadding="0" width="100%" cellspacing="0" border="0">';
echo '<tr>';
echo '<td><img src="images/menu_01.gif"></td>';
echo '<td background="images/menu_02.gif"><div id="login"><b>Gegevens</b></div></td>';
echo '<td><img src="images/menu_03.gif"></td>';
echo '</tr>';
echo '<tr>';
echo '<td background="images/menu_04.gif" width="5"></td>';
echo '<td background="images/menu_05.gif" width="100%">';
$d = 'SELECT * FROM inlog WHERE ID="'.$_COOKIE['ID'].'" AND hash="'.$_COOKIE['hash'].'"';
$h = mysql_query($d) OR die (mysql_error());
while($rij = mysql_fetch_array($h)){
echo '<table cellpadding="2" cellspacing="0">';
echo '<tr>';
echo '<td>';
echo '<b>Naam:';
echo '</td>';
echo '<td>';
echo $rij['naam'];
echo '</td>';
echo '</tr>';
echo '<tr>';
echo '<td>';
echo '<b>Geslacht:';
echo '</td>';
echo '<td>';
echo ucfirst($rij['geslacht']);
echo '</td>';
echo '</tr>';
echo '<tr>';
echo '<td>';
echo '<b>Euros:';
echo '</td>';
echo '<td>';
$dds = 'SELECT * FROM muntjes WHERE from_ID="'.$rij['ID'].'"';
$md = mysql_query($dds) OR die (mysql_error());
while($m = mysql_fetch_array($md)){
echo $m['aantal'];
}
echo '</td>';
echo '</tr>';
echo '<tr>';
echo '<td>';
echo '<b>Club:';
echo '</td>';
echo '<td>';
echo $rij['Club'];
echo '</td>';
echo '</tr>';
echo '</table>';
echo '</td>';
echo '<td background="images/menu_06.gif" width="5"></td>';
echo '</tr>';
echo '<tr>';
echo '<td><img src="images/menu_07.gif"></td>';
echo '<td background="images/menu_08.gif"></td>';
echo '<td><img src="images/menu_09.gif"></td>';
echo '</tr>';
echo '</table>';
}
echo '</td>';
echo '</tr>';
echo '</table><p>';
echo '<table cellpadding="0" cellspacing="0" border="0">';
echo '<tr>';
echo '<td><img src="images/menu_01.gif"></td>';
echo '<td background="images/menu_02.gif" width="95%"><div id="login"><b>Team:</b></div></td>';
echo '<td><img src="images/menu_03.gif"></td>';
echo '</tr>';
echo '<tr>';
echo '<td background="images/menu_04.gif" width="5"></td>';
echo '<td background="images/menu_05.gif" width="100%">';
echo $rij['spelers'];
echo '</td>';
echo '<td background="images/menu_06.gif" width="5"></td>';
echo '</tr>';
echo '<tr>';
echo '<td><img src="images/menu_07.gif"></td>';
echo '<td background="images/menu_08.gif"></td>';
echo '<td><img src="images/menu_09.gif"></td>';
echo '</tr>';
echo '</table><p>';
echo '<table cellpadding="0" cellspacing="0" border="0">';
echo '<tr>';
echo '<td><img src="images/menu_01.gif"></td>';
echo '<td background="images/menu_02.gif"><div id="login"><b>Aankopen:</b></div></td>';
echo '<td><img src="images/menu_03.gif"></td>';
echo '</tr>';
echo '<tr>';
echo '<td background="images/menu_04.gif" width="5"></td>';
echo '<td background="images/menu_05.gif" width="100%">';
$fas = 'SELECT * FROM handtas WHERE Handtas_geb_ID="'.$_COOKIE['ID'].'" AND Handtas_use!="ja"';
$ms = mysql_query($fas) OR die (mysql_error());
$i = 1;
while($r = mysql_fetch_array($ms)){
$sel = 'SELECT * FROM winkel WHERE Artikel_ID="'.$r['Handtas_art_ID'].'"';
$mys = mysql_query($sel) OR die (mysql_error());
$ass = mysql_fetch_assoc($mys);
if($ass['Artikel_spec'] == 'ja'){
echo '<a href="show_artikel_use.php?geb_ID='.$_COOKIE['ID'].'&ID='.$ass['Artikel_ID'].'&handtas_ID='.$r['Handtas_ID'].'"><img src="'.$ass['Artikel_img_URL'].'" alt="'.$ass['Artikel_naam'].'"></a> ';
} else {
echo '<img src="'.$ass['Artikel_img_URL'].'" alt="'.$ass['Artikel_naam'].'"> ';
}
if($i == 5){
echo '<br>';
$i = 0;
} else {
$i = $i + 1;
}
}
echo '<br><b>Dit zijn jou aankopen!</b>';
echo '</td>';
echo '<td background="images/menu_06.gif" width="5"></td>';
echo '</tr>';
echo '<tr>';
echo '<td><img src="images/menu_07.gif"></td>';
echo '<td background="images/menu_08.gif"></td>';
echo '<td><img src="images/menu_09.gif"></td>';
echo '</tr>';
echo '</table><p>';
$fda = 'SELECT * FROM inlog WHERE ID="'.$_COOKIE['ID'].'" AND hash="'.$_COOKIE['hash'].'"';
$fsa = mysql_query($fda) OR die (mysql_error());
while($des = mysql_fetch_array($fsa)){
if($des['handtekening'] == ""){
echo '';
} else {
echo '<table cellpadding="0" cellspacing="0" border="0">';
echo '<tr>';
echo '<td><img src="images/menu_01.gif"></td>';
echo '<td background="images/menu_02.gif"><div id="login"><b>Basisspelers voor volgende wedstrijd</b></div></td>';
echo '<td><img src="images/menu_03.gif"></td>';
echo '</tr>';
echo '<tr>';
echo '<td background="images/menu_04.gif" width="5"></td>';
echo '<td background="images/menu_05.gif" width="100%">';
echo handtek($des['handtekening']);
echo '</td>';
echo '<td background="images/menu_06.gif" width="5"></td>';
echo '</tr>';
echo '<tr>';
echo '<td><img src="images/menu_07.gif"></td>';
echo '<td background="images/menu_08.gif"></td>';
echo '<td><img src="images/menu_09.gif"></td>';
echo '</tr>';
echo '</table><p>';
}
}
echo '<table cellpadding="0" cellspacing="0" border="0">';
echo '<tr>';
echo '<td><img src="images/menu_01.gif"></td>';
echo '<td background="images/menu_02.gif"><div id="login"><b>Instellingen</b></div></td>';
echo '<td><img src="images/menu_03.gif"></td>';
echo '</tr>';
echo '<tr>';
echo '<td background="images/menu_04.gif" width="5"></td>';
echo '<td background="images/menu_05.gif" width="100%">';
echo '<table>';
echo '<tr>';
echo '<td>';
echo knop('Wachtwoord veranderen', 'edit_profiel.php?action=editpw');
echo '</td>';
echo '<td>';
echo knop('Avater veranderen', 'edit_profiel.php?action=editava');
echo '</td>';
echo '</tr>';
echo '</table>';
echo '<table>';
echo '<tr>';
echo '<td>';
echo knop('Geslacht veranderen', 'edit_profiel.php?action=editender');
echo '</td>';
echo '<td>';
echo knop('Basisspelers veranderen', 'edit_profiel.php?action=edithand');
echo '</td>';
echo '</tr>';
echo '</table>';
echo '</td>';
echo '<td background="images/menu_06.gif" width="5"></td>';
echo '</tr>';
echo '<tr>';
echo '<td><img src="images/menu_07.gif"></td>';
echo '<td background="images/menu_08.gif"></td>';
echo '<td><img src="images/menu_09.gif"></td>';
echo '</tr>';
echo '</table>';
} else {
echo 'Je moet ingelogd zijn om op deze pagina te komen!';
}
include('include/footer.php');
?>
include('include/header.php');
if($inlog == 'true'){
echo '<table width="100%" border="0" cellpadding="2" cellspacing="0" color="000000">';
echo '<tr>';
$sql = 'SELECT * FROM inlog WHERE ID="'.$_COOKIE['ID'].'" AND hash="'.$_COOKIE['hash'].'"';
$res = mysql_query($sql) OR die (mysql_error());
while($rij = mysql_fetch_assoc($res)){
if($rij['ava'] != ""){
echo '<td valign="top">';
echo '<table cellpadding="0" cellspacing="0" border="0">';
echo '<tr>';
echo '<td><img src="images/menu_01.gif"></td>';
echo '<td background="images/menu_02.gif"><div id="login"><b>Avater</b></div></td>';
echo '<td><img src="images/menu_03.gif"></td>';
echo '</tr>';
echo '<tr>';
echo '<td background="images/menu_04.gif"></td>';
echo '<td background="images/menu_05.gif"><img src="'.$rij['ava'].'"></td>';
echo '<td background="images/menu_06.gif"></td>';
echo '</tr>';
echo '<tr>';
echo '<td><img src="images/menu_07.gif"></td>';
echo '<td background="images/menu_08.gif"></td>';
echo '<td><img src="images/menu_09.gif"></td>';
echo '</tr>';
echo '</table>';
echo '</td>';
}
}
echo '<td valign="top" width="100%">';
echo '<table cellpadding="0" width="100%" cellspacing="0" border="0">';
echo '<tr>';
echo '<td><img src="images/menu_01.gif"></td>';
echo '<td background="images/menu_02.gif"><div id="login"><b>Gegevens</b></div></td>';
echo '<td><img src="images/menu_03.gif"></td>';
echo '</tr>';
echo '<tr>';
echo '<td background="images/menu_04.gif" width="5"></td>';
echo '<td background="images/menu_05.gif" width="100%">';
$d = 'SELECT * FROM inlog WHERE ID="'.$_COOKIE['ID'].'" AND hash="'.$_COOKIE['hash'].'"';
$h = mysql_query($d) OR die (mysql_error());
while($rij = mysql_fetch_array($h)){
echo '<table cellpadding="2" cellspacing="0">';
echo '<tr>';
echo '<td>';
echo '<b>Naam:';
echo '</td>';
echo '<td>';
echo $rij['naam'];
echo '</td>';
echo '</tr>';
echo '<tr>';
echo '<td>';
echo '<b>Geslacht:';
echo '</td>';
echo '<td>';
echo ucfirst($rij['geslacht']);
echo '</td>';
echo '</tr>';
echo '<tr>';
echo '<td>';
echo '<b>Euros:';
echo '</td>';
echo '<td>';
$dds = 'SELECT * FROM muntjes WHERE from_ID="'.$rij['ID'].'"';
$md = mysql_query($dds) OR die (mysql_error());
while($m = mysql_fetch_array($md)){
echo $m['aantal'];
}
echo '</td>';
echo '</tr>';
echo '<tr>';
echo '<td>';
echo '<b>Club:';
echo '</td>';
echo '<td>';
echo $rij['Club'];
echo '</td>';
echo '</tr>';
echo '</table>';
echo '</td>';
echo '<td background="images/menu_06.gif" width="5"></td>';
echo '</tr>';
echo '<tr>';
echo '<td><img src="images/menu_07.gif"></td>';
echo '<td background="images/menu_08.gif"></td>';
echo '<td><img src="images/menu_09.gif"></td>';
echo '</tr>';
echo '</table>';
}
echo '</td>';
echo '</tr>';
echo '</table><p>';
echo '<table cellpadding="0" cellspacing="0" border="0">';
echo '<tr>';
echo '<td><img src="images/menu_01.gif"></td>';
echo '<td background="images/menu_02.gif" width="95%"><div id="login"><b>Team:</b></div></td>';
echo '<td><img src="images/menu_03.gif"></td>';
echo '</tr>';
echo '<tr>';
echo '<td background="images/menu_04.gif" width="5"></td>';
echo '<td background="images/menu_05.gif" width="100%">';
echo $rij['spelers'];
echo '</td>';
echo '<td background="images/menu_06.gif" width="5"></td>';
echo '</tr>';
echo '<tr>';
echo '<td><img src="images/menu_07.gif"></td>';
echo '<td background="images/menu_08.gif"></td>';
echo '<td><img src="images/menu_09.gif"></td>';
echo '</tr>';
echo '</table><p>';
echo '<table cellpadding="0" cellspacing="0" border="0">';
echo '<tr>';
echo '<td><img src="images/menu_01.gif"></td>';
echo '<td background="images/menu_02.gif"><div id="login"><b>Aankopen:</b></div></td>';
echo '<td><img src="images/menu_03.gif"></td>';
echo '</tr>';
echo '<tr>';
echo '<td background="images/menu_04.gif" width="5"></td>';
echo '<td background="images/menu_05.gif" width="100%">';
$fas = 'SELECT * FROM handtas WHERE Handtas_geb_ID="'.$_COOKIE['ID'].'" AND Handtas_use!="ja"';
$ms = mysql_query($fas) OR die (mysql_error());
$i = 1;
while($r = mysql_fetch_array($ms)){
$sel = 'SELECT * FROM winkel WHERE Artikel_ID="'.$r['Handtas_art_ID'].'"';
$mys = mysql_query($sel) OR die (mysql_error());
$ass = mysql_fetch_assoc($mys);
if($ass['Artikel_spec'] == 'ja'){
echo '<a href="show_artikel_use.php?geb_ID='.$_COOKIE['ID'].'&ID='.$ass['Artikel_ID'].'&handtas_ID='.$r['Handtas_ID'].'"><img src="'.$ass['Artikel_img_URL'].'" alt="'.$ass['Artikel_naam'].'"></a> ';
} else {
echo '<img src="'.$ass['Artikel_img_URL'].'" alt="'.$ass['Artikel_naam'].'"> ';
}
if($i == 5){
echo '<br>';
$i = 0;
} else {
$i = $i + 1;
}
}
echo '<br><b>Dit zijn jou aankopen!</b>';
echo '</td>';
echo '<td background="images/menu_06.gif" width="5"></td>';
echo '</tr>';
echo '<tr>';
echo '<td><img src="images/menu_07.gif"></td>';
echo '<td background="images/menu_08.gif"></td>';
echo '<td><img src="images/menu_09.gif"></td>';
echo '</tr>';
echo '</table><p>';
$fda = 'SELECT * FROM inlog WHERE ID="'.$_COOKIE['ID'].'" AND hash="'.$_COOKIE['hash'].'"';
$fsa = mysql_query($fda) OR die (mysql_error());
while($des = mysql_fetch_array($fsa)){
if($des['handtekening'] == ""){
echo '';
} else {
echo '<table cellpadding="0" cellspacing="0" border="0">';
echo '<tr>';
echo '<td><img src="images/menu_01.gif"></td>';
echo '<td background="images/menu_02.gif"><div id="login"><b>Basisspelers voor volgende wedstrijd</b></div></td>';
echo '<td><img src="images/menu_03.gif"></td>';
echo '</tr>';
echo '<tr>';
echo '<td background="images/menu_04.gif" width="5"></td>';
echo '<td background="images/menu_05.gif" width="100%">';
echo handtek($des['handtekening']);
echo '</td>';
echo '<td background="images/menu_06.gif" width="5"></td>';
echo '</tr>';
echo '<tr>';
echo '<td><img src="images/menu_07.gif"></td>';
echo '<td background="images/menu_08.gif"></td>';
echo '<td><img src="images/menu_09.gif"></td>';
echo '</tr>';
echo '</table><p>';
}
}
echo '<table cellpadding="0" cellspacing="0" border="0">';
echo '<tr>';
echo '<td><img src="images/menu_01.gif"></td>';
echo '<td background="images/menu_02.gif"><div id="login"><b>Instellingen</b></div></td>';
echo '<td><img src="images/menu_03.gif"></td>';
echo '</tr>';
echo '<tr>';
echo '<td background="images/menu_04.gif" width="5"></td>';
echo '<td background="images/menu_05.gif" width="100%">';
echo '<table>';
echo '<tr>';
echo '<td>';
echo knop('Wachtwoord veranderen', 'edit_profiel.php?action=editpw');
echo '</td>';
echo '<td>';
echo knop('Avater veranderen', 'edit_profiel.php?action=editava');
echo '</td>';
echo '</tr>';
echo '</table>';
echo '<table>';
echo '<tr>';
echo '<td>';
echo knop('Geslacht veranderen', 'edit_profiel.php?action=editender');
echo '</td>';
echo '<td>';
echo knop('Basisspelers veranderen', 'edit_profiel.php?action=edithand');
echo '</td>';
echo '</tr>';
echo '</table>';
echo '</td>';
echo '<td background="images/menu_06.gif" width="5"></td>';
echo '</tr>';
echo '<tr>';
echo '<td><img src="images/menu_07.gif"></td>';
echo '<td background="images/menu_08.gif"></td>';
echo '<td><img src="images/menu_09.gif"></td>';
echo '</tr>';
echo '</table>';
} else {
echo 'Je moet ingelogd zijn om op deze pagina te komen!';
}
include('include/footer.php');
?>
Gewijzigd op 01/01/1970 01:00:00 door Roy
Geen reden dus om een nieuw topic te openen. Ga gewoon lekker verder in je oude topic, waar ik trouwens ook al antwoord op je vraag gegeven heb.
@Moderators: Sluiten maar!