Ik ben nog een noob als het om php gaat, maar volgens mij is deze code goed. Ik heb alle tutorials goed doorgelezen, maar de waarde uit voeg toe word gewoon niet geprint.
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
| <?php $dbLink = mysql_connect("localhost","140802","*******"); mysql_select_db('140802'); $strSqlCode = "SELECT * FROM producten;"; $oResultaat = mysql_query($strSqlCode); print ("<table width=950 border=0>"); print ("<tr>"); print ("<td>"); print ("<b>"); print "product_id"; print ("</td>"); print ("</b>"); print ("<td>"); print ("<b>"); print "bestel"; print ("</td>"); print ("</b>"); While ($row = mysql_fetch_array($oResultaat)) { print ("<tr>"); print ("<td>"); print $row['product_id']; print ("</td>"); session_start(); print ("<td>"); print ("<a href='?voegtoe=$row[product_id]'>[img]'images/cart.jpg'[/img]"); session_register("voegtoe"); print $voegtoe; print ("</td>"); } print ("</tr>"); print ("</table>"); ?> |