mysql inlezen maar word niet weergegeven
nu kan ik begrijpen als je op een nieuwer systeem zit. dat mogelijk het 1 en ander aangepast moet worden.
De inf.php daar staan de login gegevens in.
wat ik niet begrijp is dat hij nergens in de velden de variable weergeeft uit
de sql.
Maar het deel van $webemailadressen[x] dat laat hij wel zien.?
Ook als ik simpel weg echo $counter doe , word er geen waarde weergegeven.
Normaal zou je zeggen ja dan word er niks ingelezen van de sql, maar webemailadressen
word wel netjes weergegeven.
alvast bedankt.
via het menu krijgt hij dit door voor $id
http://............../websiteinvoerindex2.php?p=websiteinstellingen&id=1
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
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
<?php
include 'inf.php';
$datum = date("j-n-Y");
mysql_connect($host,$username,$password);
@mysql_select_db($database) or die( "Unable to select database");
$query="SELECT * FROM website WHERE id = ".$id;
$result=mysql_query($query);
$num=mysql_numrows($result);
$counter=mysql_result($result,$i,"counter");
$websitedatum[0]=mysql_result($result,$i,"websitedatum");
$from=mysql_result($result,$i,"van");
$to=mysql_result($result,$i,"naar");
$from2=mysql_result($result,$i,"emailadresfrom");
$copyright=mysql_result($result,$i,"copyright");
echo "<BR><BR><BR> test";
echo $counter;
// email adressen inlezen
$query2="SELECT * FROM webemailadressen ORDER BY emailadres ASC";
$result2=mysql_query($query2);
$num=mysql_numrows($result2);
$i=0;
while ($i < $num) {
// $id=mysql_result($result,$i,"id");
$webemailadressen[$i]=mysql_result($result2,$i,"emailadres");
$i++;
}
mysql_close();
// hier word php weer afgesloten
<p> </p>
<p> </p>
<form id="form1" name="form1" method="post" action='websiteinvoerindex2.php?p=websitewijzigen2&id=1'>
<table width="769" border="1">
<tr>
<td width="323">Gasten Teller</td>
<td width="430"><label>
<input name="gastenteller" type="text" id="gastenteller" value="<? echo $counter?>" />
</label></td>
</tr>
<tr>
<td>Datum bijwerking site</td>
<td><input name="datumsite" type="text" id="datumsite" value="<?php echo $websitedatum[0]?>" />
dd-mm-jjjj
<label>
<select name="datum2" id="datum2">
<option value="<?php echo "" ?> ">[code]<?php echo "1" ?></option>
<option value="<?php echo $datum ?> "><?php echo $datum ?></option>
</select>
</label></td>
</tr>
<tr>
<td>Van Emailadres (intern gebruik)</td>
<td><input name="from" type="text" id="from" value="<?php echo $from?>" size="30" /></td>
</tr>
<tr>
<td>Naar Emailadres (klanten mailen naar) mailwebsite</td>
<td><input name="to" type="text" id="to" value="<?php echo $to?>" size="30" /></td>
</tr>
<tr>
<td>Emailadres from (klanten mailen naar) mailtracing</td>
<td><input name="from2" type="text" id="from2" value="<?php echo $from2?>" size="30" /></td>
</tr>
<tr>
<td>Copyright regel</td>
<td><input name="copyright" type="text" id="copyright" value="<?php echo $copyright?>" size="30" /></td>
</tr>
<tr>
<td> </td>
<td> </td>
</tr>
<tr>
<td height="56" valign=top >Web Mailing Email adressen van:<br />
<label for="webemailadrestoevoegen"></label></td>
<td valign = top><label for="webemailadressen"></label>
<select name="webemailadressen" id="webemailadressen">
<option ></option>
<option ><?php echo $webemailadressen[0] ?></option>
<option ><?php echo $webemailadressen[1] ?></option>
<option ><?php echo $webemailadressen[2] ?></option>
<option ><?php echo $webemailadressen[3] ?></option>
<option ><?php echo $webemailadressen[4] ?></option>
<option ><?php echo $webemailadressen[5] ?></option>
<option ><?php echo $webemailadressen[6] ?></option>
<option ><?php echo $webemailadressen[7] ?></option>
<option ><?php echo $webemailadressen[8] ?></option>
<option ><?php echo $webemailadressen[9] ?></option>
<option ><?php echo $webemailadressen[10] ?></option>
</select></td>
</tr>
<tr>
<td>Web Email adres Toevoegen</td>
<td><input name="webemailadressent" type="text" id="webemailadressent" size="70" /></td>
</tr>
<tr>
<td bgcolor="#FF0000">Web Mailing Email adressen van VERWIJDEREN:</td>
<td><select name="webemailadressenverw" id="webemailadressenverw">
<option ></option>
<option value="0"><?php echo $webemailadressen[0] ?></option>
<option value="1"><?php echo $webemailadressen[1] ?></option>
<option value="2"><?php echo $webemailadressen[2] ?></option>
<option value="3"><?php echo $webemailadressen[3] ?></option>
<option value="4"><?php echo $webemailadressen[4] ?></option>
<option value="5"><?php echo $webemailadressen[5] ?></option>
<option value="6"><?php echo $webemailadressen[6] ?></option>
<option value="7"><?php echo $webemailadressen[7] ?></option>
<option value="8"><?php echo $webemailadressen[8] ?></option>
<option value="9"><?php echo $webemailadressen[9] ?></option>
<option value="10"><?php echo $webemailadressen[10] ?></option>
</select></td>
</tr>
<tr>
<td> </td>
<td> </td>
</tr>
<tr>
<td> </td>
<td> </td>
</tr>
<tr>
<td> </td>
<td> </td>
</tr>
<tr>
<td> </td>
<td> </td>
</tr>
<tr>
<td><input type="submit" name="button" id="button" value="Wijzigen" /></td>
<td> </td>
</tr>
</table>
</form>
?>
include 'inf.php';
$datum = date("j-n-Y");
mysql_connect($host,$username,$password);
@mysql_select_db($database) or die( "Unable to select database");
$query="SELECT * FROM website WHERE id = ".$id;
$result=mysql_query($query);
$num=mysql_numrows($result);
$counter=mysql_result($result,$i,"counter");
$websitedatum[0]=mysql_result($result,$i,"websitedatum");
$from=mysql_result($result,$i,"van");
$to=mysql_result($result,$i,"naar");
$from2=mysql_result($result,$i,"emailadresfrom");
$copyright=mysql_result($result,$i,"copyright");
echo "<BR><BR><BR> test";
echo $counter;
// email adressen inlezen
$query2="SELECT * FROM webemailadressen ORDER BY emailadres ASC";
$result2=mysql_query($query2);
$num=mysql_numrows($result2);
$i=0;
while ($i < $num) {
// $id=mysql_result($result,$i,"id");
$webemailadressen[$i]=mysql_result($result2,$i,"emailadres");
$i++;
}
mysql_close();
// hier word php weer afgesloten
<p> </p>
<p> </p>
<form id="form1" name="form1" method="post" action='websiteinvoerindex2.php?p=websitewijzigen2&id=1'>
<table width="769" border="1">
<tr>
<td width="323">Gasten Teller</td>
<td width="430"><label>
<input name="gastenteller" type="text" id="gastenteller" value="<? echo $counter?>" />
</label></td>
</tr>
<tr>
<td>Datum bijwerking site</td>
<td><input name="datumsite" type="text" id="datumsite" value="<?php echo $websitedatum[0]?>" />
dd-mm-jjjj
<label>
<select name="datum2" id="datum2">
<option value="<?php echo "" ?> ">[code]<?php echo "1" ?></option>
<option value="<?php echo $datum ?> "><?php echo $datum ?></option>
</select>
</label></td>
</tr>
<tr>
<td>Van Emailadres (intern gebruik)</td>
<td><input name="from" type="text" id="from" value="<?php echo $from?>" size="30" /></td>
</tr>
<tr>
<td>Naar Emailadres (klanten mailen naar) mailwebsite</td>
<td><input name="to" type="text" id="to" value="<?php echo $to?>" size="30" /></td>
</tr>
<tr>
<td>Emailadres from (klanten mailen naar) mailtracing</td>
<td><input name="from2" type="text" id="from2" value="<?php echo $from2?>" size="30" /></td>
</tr>
<tr>
<td>Copyright regel</td>
<td><input name="copyright" type="text" id="copyright" value="<?php echo $copyright?>" size="30" /></td>
</tr>
<tr>
<td> </td>
<td> </td>
</tr>
<tr>
<td height="56" valign=top >Web Mailing Email adressen van:<br />
<label for="webemailadrestoevoegen"></label></td>
<td valign = top><label for="webemailadressen"></label>
<select name="webemailadressen" id="webemailadressen">
<option ></option>
<option ><?php echo $webemailadressen[0] ?></option>
<option ><?php echo $webemailadressen[1] ?></option>
<option ><?php echo $webemailadressen[2] ?></option>
<option ><?php echo $webemailadressen[3] ?></option>
<option ><?php echo $webemailadressen[4] ?></option>
<option ><?php echo $webemailadressen[5] ?></option>
<option ><?php echo $webemailadressen[6] ?></option>
<option ><?php echo $webemailadressen[7] ?></option>
<option ><?php echo $webemailadressen[8] ?></option>
<option ><?php echo $webemailadressen[9] ?></option>
<option ><?php echo $webemailadressen[10] ?></option>
</select></td>
</tr>
<tr>
<td>Web Email adres Toevoegen</td>
<td><input name="webemailadressent" type="text" id="webemailadressent" size="70" /></td>
</tr>
<tr>
<td bgcolor="#FF0000">Web Mailing Email adressen van VERWIJDEREN:</td>
<td><select name="webemailadressenverw" id="webemailadressenverw">
<option ></option>
<option value="0"><?php echo $webemailadressen[0] ?></option>
<option value="1"><?php echo $webemailadressen[1] ?></option>
<option value="2"><?php echo $webemailadressen[2] ?></option>
<option value="3"><?php echo $webemailadressen[3] ?></option>
<option value="4"><?php echo $webemailadressen[4] ?></option>
<option value="5"><?php echo $webemailadressen[5] ?></option>
<option value="6"><?php echo $webemailadressen[6] ?></option>
<option value="7"><?php echo $webemailadressen[7] ?></option>
<option value="8"><?php echo $webemailadressen[8] ?></option>
<option value="9"><?php echo $webemailadressen[9] ?></option>
<option value="10"><?php echo $webemailadressen[10] ?></option>
</select></td>
</tr>
<tr>
<td> </td>
<td> </td>
</tr>
<tr>
<td> </td>
<td> </td>
</tr>
<tr>
<td> </td>
<td> </td>
</tr>
<tr>
<td> </td>
<td> </td>
</tr>
<tr>
<td><input type="submit" name="button" id="button" value="Wijzigen" /></td>
<td> </td>
</tr>
</table>
</form>
?>
Gewijzigd op 25/09/2013 22:29:38 door Space gremlin
Waar komt $id vandaan op regel 13?
http://.........../websiteinvoerindex2.php?p=websiteinstellingen&id=1
Echter gaat dat nog goed want hij krijgt de email gegevens wel door.
Gewijzigd op 25/09/2013 22:28:53 door space gremlin
Uhm, dan blijft de vraag 'waar komt $id vandaan'? En nee, als je in de url een variabele id hebt staan, dan komt die niet automatisch in een variabele terecht. Die parameters komen in de $_GET array. In elk geval tegenwoordig....
want verder op voor die email doe ik dit niet.
ik ga die id er even hard in zetten als 1, eens kijken wat die dan doet.
Toevoeging op 25/09/2013 22:40:38:
mijn dank is groot zo iets simpels.
heb hem er hard in gezet en nu werkt het wel.
dan weet ik in ieder geval waar ik aan moet werken.
Toevoeging op 26/09/2013 15:18:52:
Ik had nog even een vervolg vraag, en dit heeft volgens mij te maken met het verkrijgen van de variable van de ene php naar de andere php.
Heeft iemand enig idee waar ik de fout in ga.
Voorhand zal ik meteen melden dat het niet de meest logisch script is.
Er worden 3 script weer gegeven de eerst geeft de opties door. Dit werkt
De 2de script geeft een soort header weer. in dit 2de deel word een include 4 keer aangeroepen (script3). waar deze weer data moet laten zien. echter krijg ik daar geen data te zien. en dit heeft te maken dat ik iets niet goed doe met de post get optie. alvast bedankt.
zoekfunctie
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
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
<?php $actionsub ="index2.php?p=cartridgesgames_search_sub2&developer=brandall";
$keuze_1=0;
$keuze_2=0;
$keuze_3=0;
$keuze_4=0;
// hier word php afgesloten
<link rel="stylesheet" href="css/stylelinks.css" type="text/css" media="screen, projection"/>
<div align="center">
<p> </p>
<p>[code]<?php echo $cartridgessearch_1 ?> <br />
</p>
<form id="form1" name="form1" method="post" action="<?php echo $actionsub ?>">
<label></label>
<table width="488" border="1" class="design2">
<tr>
<td width="143" valign="top" ><?php echo $cartridgessearch_text10 ?></td>
<td width="329"><label><?php echo $cartridgessearch_text5 ?><br />
</label></td>
</tr>
<tr>
<td><label>
<input type="radio" name="keuze_5" id="keuze_5" value="1" />
<?php echo $cartridgessearch_text11 ?><br />
<input name="keuze_5" type="radio" id="keuze_5" value="2" checked="checked" />
<?php echo $cartridgessearch_text12 ?><br />
<input type="radio" name="keuze_5" id="keuze_5" value="3" />
<?php echo $cartridgessearch_text13 ?><br />
<input type="radio" name="keuze_5" id="keuze_5" value="4" />
<?php echo $cartridgessearch_text14 ?></label></td>
<td><input name="keuze_1" type="checkbox" id="keuze_1" value="1" checked="checked" />
<?php echo $cartridgessearch_text1 ?><br />
<input name="keuze_2" type="checkbox" id="keuze_2" value="1" checked="checked" />
<?php echo $cartridgessearch_text8 ?><br />
<input name="keuze_3" type="checkbox" id="keuze_3" value="1" checked="checked" />
<?php echo $cartridgessearch_text4 ?><br />
<input name="keuze_4" type="checkbox" id="keuze_4" value="1" checked="checked" />
<?php echo $cartridgessearch_text6 ?></td>
</tr>
<tr>
<td><?php echo $cartridgessearch_text9 ?></td>
<td><input class="design1" name="namec" type="text" id="namec" size="50" /></td>
</tr>
</table>
<br />
<label>
<input class="button" type="submit" name="Send" id="Send" value="<?=$cartridgessearch_button?>" />
<br />
<br />
<?php echo $cartridgessearch_text3 ?>
</label>
<br />
<br />
Under Construction<br />
<br />
</form>
</td>
</div>
?>
$keuze_1=0;
$keuze_2=0;
$keuze_3=0;
$keuze_4=0;
// hier word php afgesloten
<link rel="stylesheet" href="css/stylelinks.css" type="text/css" media="screen, projection"/>
<div align="center">
<p> </p>
<p>[code]<?php echo $cartridgessearch_1 ?> <br />
</p>
<form id="form1" name="form1" method="post" action="<?php echo $actionsub ?>">
<label></label>
<table width="488" border="1" class="design2">
<tr>
<td width="143" valign="top" ><?php echo $cartridgessearch_text10 ?></td>
<td width="329"><label><?php echo $cartridgessearch_text5 ?><br />
</label></td>
</tr>
<tr>
<td><label>
<input type="radio" name="keuze_5" id="keuze_5" value="1" />
<?php echo $cartridgessearch_text11 ?><br />
<input name="keuze_5" type="radio" id="keuze_5" value="2" checked="checked" />
<?php echo $cartridgessearch_text12 ?><br />
<input type="radio" name="keuze_5" id="keuze_5" value="3" />
<?php echo $cartridgessearch_text13 ?><br />
<input type="radio" name="keuze_5" id="keuze_5" value="4" />
<?php echo $cartridgessearch_text14 ?></label></td>
<td><input name="keuze_1" type="checkbox" id="keuze_1" value="1" checked="checked" />
<?php echo $cartridgessearch_text1 ?><br />
<input name="keuze_2" type="checkbox" id="keuze_2" value="1" checked="checked" />
<?php echo $cartridgessearch_text8 ?><br />
<input name="keuze_3" type="checkbox" id="keuze_3" value="1" checked="checked" />
<?php echo $cartridgessearch_text4 ?><br />
<input name="keuze_4" type="checkbox" id="keuze_4" value="1" checked="checked" />
<?php echo $cartridgessearch_text6 ?></td>
</tr>
<tr>
<td><?php echo $cartridgessearch_text9 ?></td>
<td><input class="design1" name="namec" type="text" id="namec" size="50" /></td>
</tr>
</table>
<br />
<label>
<input class="button" type="submit" name="Send" id="Send" value="<?=$cartridgessearch_button?>" />
<br />
<br />
<?php echo $cartridgessearch_text3 ?>
</label>
<br />
<br />
Under Construction<br />
<br />
</form>
</td>
</div>
?>
inlezen data.
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
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
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
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
<?php
<link rel="stylesheet" href="css/stylelinks.css" type="text/css" media="screen, projection"/>
<style type="text/css">
<!--
.stijl1 {font-weight: bold}
-->
</style>
<div align="center">
// hier gaat php open
$developer=$_GET["developer"];
$namec=$_POST["namec"];
$keuze_1=$_POST["keuze_1"];
$keuze_2=$_POST["keuze_2"];
$keuze_3=$_POST["keuze_3"];
$keuze_4=$_POST["keuze_4"];
$keuze_5=$_POST["keuze_5"];
echo "<br><br><br>".$developer.$namec.$sort.$keuze_1.$keuze_2.$keuze_3.$keuze_4.$keuze_5;
if ($namec<>"") {
if ($sort=="0") {$actionsub = 'index2.php?p=cartridgesgames&developer='.$developer.'&sort=1&feedback_info='.$feedback_info;}
if ($sort=="1") {$actionsub = 'index2.php?p=cartridgesgames&developer='.$developer.'&sort=0&feedback_info='.$feedback_info;}
// hier gaat php dicht
<form id="form1" name="form1" method="post" action="<?php echo $actionsub ?>">
// hier gaat php open
include 'inf.php';
if ($developer=="konami") { $cartridges_sql="cartridges"; }
else
{ $cartridges_sql="cartridges". strtolower($developer);}
echo "<BR><BR><br><BR>";
// hier gaat php dicht
<img src="plaatjes/brandall.png" width="286" height="51" />
<br />
</p>
<table width="751" border="0">
<tr>
<td width="76" ></td>
<td width="144">[code]<?php echo $infoclick_1 ?></td>
<td width="32"> </td>
<td width="50"></td>
<td width="393"><div align="center">
</div></td>
<td width="30"></td>
</tr>
</table>
__________________________________________________________________________________________________________
// hier gaat php open
if ($_COOKIE["language"]=="nl") {$description2="description_nl";}
else
{$description2="description_en";}
$keuze_sub = '';
$keuze_name = '';
$keuze_cartnr = '';
$keuze_sound = '';
$keuze_description = '';
$keuze = array();
// zoeken in de velden
if ($keuze_1==1) {$keuze['name'] = " `name` LIKE '%".$namec."%' "; }// 1
if ($keuze_2==1) {$keuze['cartnr'] = " `cartnr` LIKE '%".$namec."%' "; }// 2
if ($keuze_3==1) {$keuze['sound'] = " `sound` LIKE '%".$namec."%' "; }// 3
if ($keuze_4==1) {$keuze['description'] = " `".$description2."` LIKE '%".$namec."%' "; }// 4
// sorteren op
if ($keuze_5==1) {$keuze_sort="cartnr";}
if ($keuze_5==2) {$keuze_sort="name";}
if ($keuze_5==3) {$keuze_sort="sound";}
if ($keuze_5==4) {$keuze_sort=$description2;}
// alleen als er keuzes gemaakt zijn
if(count($keuze))
{
// plak alle keuzes uit de array achter elkaar en zet er ' || ' tussen.
$keuze_sub = ' WHERE ' . implode(' || ', $keuze). ' ORDER BY '.$keuze_sort.' ASC';
}
mysql_connect($host,$username,$password);
@mysql_select_db($database) or die( "Unable to select database");
echo '<BR><BR><BR>'.$keuze_sub;
$query ="SELECT * FROM `cartridges` ".$keuze_sub;
$query2="SELECT * FROM `cartridgescasio` ".$keuze_sub;
$query3="SELECT * FROM `cartridgessony` ".$keuze_sub;
$query4="SELECT * FROM `cartridgesoverige` ".$keuze_sub;
$result=mysql_query($query);
$result2=mysql_query($query2);
$result3=mysql_query($query3);
$result4=mysql_query($query4);
$num=mysql_numrows($result);
$num2=mysql_numrows($result2);
$num3=mysql_numrows($result3);
$num4=mysql_numrows($result4);
$i=0;
$t=0;
// konami
while ($i < $num) {
$id=mysql_result($result,$i,"id");
$cartnr=mysql_result($result,$i,"cartnr");
$cartnr_sub=mysql_result($result,$i,"cartnr_sub");
$name=mysql_result($result,$i,"name");
$developer=mysql_result($result,$i,"developer");
$released=mysql_result($result,$i,"released");
$sound=mysql_result($result,$i,"sound");
$system=mysql_result($result,$i,"system");
if ($_COOKIE["language"]=="nl") {$description=mysql_result($result,$i,"description_nl");}
else
{$description=mysql_result($result,$i,"description_en");}
$link=mysql_result($result,$i,"link");
include 'cartridgesgames_search_sub3.php';
$i++;
}
// sony
$i=0;
$t=0;
while ($i < $num2) {
$id=mysql_result($result2,$i,"id");
$cartnr=mysql_result($result2,$i,"cartnr");
$cartnr_sub=mysql_result($result2,$i,"cartnr_sub");
$name=mysql_result($result2,$i,"name");
$developer=mysql_result($result2,$i,"developer");
$released=mysql_result($result2,$i,"released");
$sound=mysql_result($result2,$i,"sound");
$system=mysql_result($result2,$i,"system");
if ($_COOKIE["language"]=="nl") {$description=mysql_result($result2,$i,"description_nl");}
else
{$description=mysql_result($result2,$i,"description_en");}
$link=mysql_result($result2,$i,"link");
include 'cartridgesgames_search_sub3.php';
$i++;
}
// casio
$i=0;
$t=0;
while ($i < $num3) {
$id=mysql_result($result3,$i,"id");
$cartnr=mysql_result($result3,$i,"cartnr");
$cartnr_sub=mysql_result($result3,$i,"cartnr_sub");
$name=mysql_result($result3,$i,"name");
$developer=mysql_result($result3,$i,"developer");
$released=mysql_result($result3,$i,"released");
$sound=mysql_result($result3,$i,"sound");
$system=mysql_result($result3,$i,"system");
if ($_COOKIE["language"]=="nl") {$description=mysql_result($result3,$i,"description_nl");}
else
{$description=mysql_result($result3,$i,"description_en");}
$link=mysql_result($result3,$i,"link");
include 'cartridgesgames_search_sub3.php';
$i++;
}
// overige
$i=0;
$t=4;
while ($i < $num4) {
$id=mysql_result($result4,$i,"id");
$cartnr=mysql_result($result4,$i,"cartnr");
$cartnr_sub=mysql_result($result4,$i,"cartnr_sub");
$name=mysql_result($result4,$i,"name");
$developer=mysql_result($result4,$i,"developer");
$released=mysql_result($result4,$i,"released");
$sound=mysql_result($result4,$i,"sound");
$system=mysql_result($result4,$i,"system");
if ($_COOKIE["language"]=="nl") {$description=mysql_result($result4,$i,"description_nl");}
else
{$description=mysql_result($result4,$i,"description_en");}
$link=mysql_result($result4,$i,"link");
include 'cartridgesgames_search_sub3.php';
$i++;
}
mysql_close();
} else
{
echo "<BR><BR><BR><BR> ".$cartridgessearch_text2;
echo "<BR><BR><BR><BR> ".$cartridgessearch_text7."<BR><BR>";
}
?>
<link rel="stylesheet" href="css/stylelinks.css" type="text/css" media="screen, projection"/>
<style type="text/css">
<!--
.stijl1 {font-weight: bold}
-->
</style>
<div align="center">
// hier gaat php open
$developer=$_GET["developer"];
$namec=$_POST["namec"];
$keuze_1=$_POST["keuze_1"];
$keuze_2=$_POST["keuze_2"];
$keuze_3=$_POST["keuze_3"];
$keuze_4=$_POST["keuze_4"];
$keuze_5=$_POST["keuze_5"];
echo "<br><br><br>".$developer.$namec.$sort.$keuze_1.$keuze_2.$keuze_3.$keuze_4.$keuze_5;
if ($namec<>"") {
if ($sort=="0") {$actionsub = 'index2.php?p=cartridgesgames&developer='.$developer.'&sort=1&feedback_info='.$feedback_info;}
if ($sort=="1") {$actionsub = 'index2.php?p=cartridgesgames&developer='.$developer.'&sort=0&feedback_info='.$feedback_info;}
// hier gaat php dicht
<form id="form1" name="form1" method="post" action="<?php echo $actionsub ?>">
// hier gaat php open
include 'inf.php';
if ($developer=="konami") { $cartridges_sql="cartridges"; }
else
{ $cartridges_sql="cartridges". strtolower($developer);}
echo "<BR><BR><br><BR>";
// hier gaat php dicht
<img src="plaatjes/brandall.png" width="286" height="51" />
<br />
</p>
<table width="751" border="0">
<tr>
<td width="76" ></td>
<td width="144">[code]<?php echo $infoclick_1 ?></td>
<td width="32"> </td>
<td width="50"></td>
<td width="393"><div align="center">
</div></td>
<td width="30"></td>
</tr>
</table>
__________________________________________________________________________________________________________
// hier gaat php open
if ($_COOKIE["language"]=="nl") {$description2="description_nl";}
else
{$description2="description_en";}
$keuze_sub = '';
$keuze_name = '';
$keuze_cartnr = '';
$keuze_sound = '';
$keuze_description = '';
$keuze = array();
// zoeken in de velden
if ($keuze_1==1) {$keuze['name'] = " `name` LIKE '%".$namec."%' "; }// 1
if ($keuze_2==1) {$keuze['cartnr'] = " `cartnr` LIKE '%".$namec."%' "; }// 2
if ($keuze_3==1) {$keuze['sound'] = " `sound` LIKE '%".$namec."%' "; }// 3
if ($keuze_4==1) {$keuze['description'] = " `".$description2."` LIKE '%".$namec."%' "; }// 4
// sorteren op
if ($keuze_5==1) {$keuze_sort="cartnr";}
if ($keuze_5==2) {$keuze_sort="name";}
if ($keuze_5==3) {$keuze_sort="sound";}
if ($keuze_5==4) {$keuze_sort=$description2;}
// alleen als er keuzes gemaakt zijn
if(count($keuze))
{
// plak alle keuzes uit de array achter elkaar en zet er ' || ' tussen.
$keuze_sub = ' WHERE ' . implode(' || ', $keuze). ' ORDER BY '.$keuze_sort.' ASC';
}
mysql_connect($host,$username,$password);
@mysql_select_db($database) or die( "Unable to select database");
echo '<BR><BR><BR>'.$keuze_sub;
$query ="SELECT * FROM `cartridges` ".$keuze_sub;
$query2="SELECT * FROM `cartridgescasio` ".$keuze_sub;
$query3="SELECT * FROM `cartridgessony` ".$keuze_sub;
$query4="SELECT * FROM `cartridgesoverige` ".$keuze_sub;
$result=mysql_query($query);
$result2=mysql_query($query2);
$result3=mysql_query($query3);
$result4=mysql_query($query4);
$num=mysql_numrows($result);
$num2=mysql_numrows($result2);
$num3=mysql_numrows($result3);
$num4=mysql_numrows($result4);
$i=0;
$t=0;
// konami
while ($i < $num) {
$id=mysql_result($result,$i,"id");
$cartnr=mysql_result($result,$i,"cartnr");
$cartnr_sub=mysql_result($result,$i,"cartnr_sub");
$name=mysql_result($result,$i,"name");
$developer=mysql_result($result,$i,"developer");
$released=mysql_result($result,$i,"released");
$sound=mysql_result($result,$i,"sound");
$system=mysql_result($result,$i,"system");
if ($_COOKIE["language"]=="nl") {$description=mysql_result($result,$i,"description_nl");}
else
{$description=mysql_result($result,$i,"description_en");}
$link=mysql_result($result,$i,"link");
include 'cartridgesgames_search_sub3.php';
$i++;
}
// sony
$i=0;
$t=0;
while ($i < $num2) {
$id=mysql_result($result2,$i,"id");
$cartnr=mysql_result($result2,$i,"cartnr");
$cartnr_sub=mysql_result($result2,$i,"cartnr_sub");
$name=mysql_result($result2,$i,"name");
$developer=mysql_result($result2,$i,"developer");
$released=mysql_result($result2,$i,"released");
$sound=mysql_result($result2,$i,"sound");
$system=mysql_result($result2,$i,"system");
if ($_COOKIE["language"]=="nl") {$description=mysql_result($result2,$i,"description_nl");}
else
{$description=mysql_result($result2,$i,"description_en");}
$link=mysql_result($result2,$i,"link");
include 'cartridgesgames_search_sub3.php';
$i++;
}
// casio
$i=0;
$t=0;
while ($i < $num3) {
$id=mysql_result($result3,$i,"id");
$cartnr=mysql_result($result3,$i,"cartnr");
$cartnr_sub=mysql_result($result3,$i,"cartnr_sub");
$name=mysql_result($result3,$i,"name");
$developer=mysql_result($result3,$i,"developer");
$released=mysql_result($result3,$i,"released");
$sound=mysql_result($result3,$i,"sound");
$system=mysql_result($result3,$i,"system");
if ($_COOKIE["language"]=="nl") {$description=mysql_result($result3,$i,"description_nl");}
else
{$description=mysql_result($result3,$i,"description_en");}
$link=mysql_result($result3,$i,"link");
include 'cartridgesgames_search_sub3.php';
$i++;
}
// overige
$i=0;
$t=4;
while ($i < $num4) {
$id=mysql_result($result4,$i,"id");
$cartnr=mysql_result($result4,$i,"cartnr");
$cartnr_sub=mysql_result($result4,$i,"cartnr_sub");
$name=mysql_result($result4,$i,"name");
$developer=mysql_result($result4,$i,"developer");
$released=mysql_result($result4,$i,"released");
$sound=mysql_result($result4,$i,"sound");
$system=mysql_result($result4,$i,"system");
if ($_COOKIE["language"]=="nl") {$description=mysql_result($result4,$i,"description_nl");}
else
{$description=mysql_result($result4,$i,"description_en");}
$link=mysql_result($result4,$i,"link");
include 'cartridgesgames_search_sub3.php';
$i++;
}
mysql_close();
} else
{
echo "<BR><BR><BR><BR> ".$cartridgessearch_text2;
echo "<BR><BR><BR><BR> ".$cartridgessearch_text7."<BR><BR>";
}
?>
data inlezen sub, hier gaat het niet goed tbv het inlezen van de data uit sub2
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
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
<?php
$t=$_GET=('t');
$id=$_POST("id");
$cartnr=$_POST("cartnr");
$cartnr_sub=$_POST("cartnr_sub");
$name=$_POST("name");
$developer=$_POST("developer");
$released=$_POST("released");
$sound=$_POST("sound");
$system=$_POST("system");
$link=$_POST("link");
// $description_nl=$_POST("description_nl");
// $description_en=$_POST("description_en");
$description=$_POST("description");
if ($t==4) {$link=mysql_result($result4,$i,"link");}
if (strlen($description) > 50) {$extra ="...";}
$cartnr2=strtolower($cartnr);
$name2=strtolower($name);
$link2=strtolower($link);
$sound2=strtolower($sound);
if ($sound =="" or $released=="") {$sound="logoempty";};
if ($system =="") {$system="msxleeg";};
// hier gaat php dicht
</form>
<div align="center">
<table width="747" border="0" style="border-collapse:collapse;" cellpadding="0" cellspacing="0" summary="">
<tr>
<td width="75" >[code]<?php echo $cartnr ?></td>
<td width="133">
// hier gaat php open
if ($t==0 or $t==2 or $t==3) {echo '<a href="index2.php?p=cartridgesrc2&id='.$id.'&developer='.$developer.'">'.$name.'</a>';}
if ($t==4) {echo '<a href="index2.php?p='.$link2.'&feedback_info='.$name.'">'.$name.'</a>';}
// hier gaat php dicht
</td>
<td width="44"><?php echo '<img src="plaatjes/'.$released.'.jpg" width="30" height="11" />'; ?></td>
<td width="48"><?php echo '<img src="plaatjes/'.$sound2.'.gif" width="35" height="15" />'; ?></td>
<td width="40"><?php echo '<img src="plaatjes/'.$system.'.jpg" />'; ?></td>
<td width="394"><?php echo substr($description,0,50).$extra; ?></td>
<td width="27"><?php echo '<a href="index2.php?p=contact&feedback_info='.$cartnr." ".$name." ".$developer.'"><img src="plaatjes/comment-small.png" alt="'.$addcomment.'" /></a>'; ?></td>
</tr>
</table>
</div>
// hier gaat php open
$extra="";
// hier gaat php dicht
?>
$t=$_GET=('t');
$id=$_POST("id");
$cartnr=$_POST("cartnr");
$cartnr_sub=$_POST("cartnr_sub");
$name=$_POST("name");
$developer=$_POST("developer");
$released=$_POST("released");
$sound=$_POST("sound");
$system=$_POST("system");
$link=$_POST("link");
// $description_nl=$_POST("description_nl");
// $description_en=$_POST("description_en");
$description=$_POST("description");
if ($t==4) {$link=mysql_result($result4,$i,"link");}
if (strlen($description) > 50) {$extra ="...";}
$cartnr2=strtolower($cartnr);
$name2=strtolower($name);
$link2=strtolower($link);
$sound2=strtolower($sound);
if ($sound =="" or $released=="") {$sound="logoempty";};
if ($system =="") {$system="msxleeg";};
// hier gaat php dicht
</form>
<div align="center">
<table width="747" border="0" style="border-collapse:collapse;" cellpadding="0" cellspacing="0" summary="">
<tr>
<td width="75" >[code]<?php echo $cartnr ?></td>
<td width="133">
// hier gaat php open
if ($t==0 or $t==2 or $t==3) {echo '<a href="index2.php?p=cartridgesrc2&id='.$id.'&developer='.$developer.'">'.$name.'</a>';}
if ($t==4) {echo '<a href="index2.php?p='.$link2.'&feedback_info='.$name.'">'.$name.'</a>';}
// hier gaat php dicht
</td>
<td width="44"><?php echo '<img src="plaatjes/'.$released.'.jpg" width="30" height="11" />'; ?></td>
<td width="48"><?php echo '<img src="plaatjes/'.$sound2.'.gif" width="35" height="15" />'; ?></td>
<td width="40"><?php echo '<img src="plaatjes/'.$system.'.jpg" />'; ?></td>
<td width="394"><?php echo substr($description,0,50).$extra; ?></td>
<td width="27"><?php echo '<a href="index2.php?p=contact&feedback_info='.$cartnr." ".$name." ".$developer.'"><img src="plaatjes/comment-small.png" alt="'.$addcomment.'" /></a>'; ?></td>
</tr>
</table>
</div>
// hier gaat php open
$extra="";
// hier gaat php dicht
?>