Hallo,
Ik heb nu een MySQL database draaien met daarin prodcuten en prodcutinformatie enzo. Nu heb ik een overzichtspagina van alle producten:
<html>
<head>
<title>Bestelpagina</title>
<STYLE type="text/css">
<!--
BODY {
scrollbar-face-color:#394E7B;
scrollbar-highlight-color:#394E7B;
scrollbar-3dlight-color:#8A4647;
scrollbar-darkshadow-color:#394E7B;
scrollbar-shadow-color:#F5ECED;
scrollbar-arrow-color:#F5ECED;
scrollbar-track-color:#8A4647;
}
-->
</STYLE>
</head>
<body bgcolor="#F5ECED">
<table border="0" width="100%" cellpadding="0" style="border-collapse: collapse" bordercolor="#394E7B" id="table1">
<tr>
<td style="border-bottom-style: solid; border-bottom-width: 1px">
<img border="0" src="tire.gif" width="48" height="62"><b><font face="Arial" size="2" color="#394E7B">Overzicht Blades en bestellen</font></b></td>
</tr>
<tr>
<td style="border-left-width: 1px; border-right-width: 1px; border-top-width: 1px; border-bottom-style: solid; border-bottom-width: 1px">
<font face="Arial" size="2" color="#394E7B">Op deze pagina kun je alle Blades bekijken, alle blades zijn in <B>elke maat</B> en in <B>elke kleur verkrijgbaar</B>, onderstaande blades zijn slechts voorbeelden. Als je een Blade besteld staat er vanzelfsprekend niet de tekst: 'scootblades.tk' op.</font>
</td>
</tr>
</table><BR>
<?
mysql_connect ("localhost","root", "MIJNPASS");
mysql_select_db("ScootBlades");
$sql = "SELECT * FROM Blades ORDER BY ID DESC";
$result= mysql_query($sql) or die (' Error SQL! <br>'.$sql.' <br>'. mysql_error());
while($data = mysql_fetch_assoc($result))
{
$ID = $data['ID'];
$Naam = $data['Naam'];
$Prijs = $data['Prijs'];
$Image = $data['Image'];
$Extrainformatie = $data['Extrainformatie'];
echo "<center><table border=\"1\" width=\"1%\" style=\"border-collapse: collapse\" bordercolor=\"#8A4647\" id=\"table1\">
<tr>
<td width=\"25%\" bgcolor=\"#394E7B\"><font face=\"Arial\" size=\"1\" color=\"#ffffff\">Naam: $Naam</font></td>
<td width=\"25%\" bgcolor=\"#394E7B\"><font face=\"Arial\" size=\"1\" color=\"#ffffff\">Bestelcode: $ID</font></td>
<td width=\"25%\" bgcolor=\"#394E7B\"><font face=\"Arial\" size=\"1\" color=\"#ffffff\">Prijs: $Prijs</font></td>
</tr>
<tr>
<td colspan=\"3\" bgcolor=\"#8A4647\"><font face=\"Arial\" size=\"1\" color=\"#003366\"><center><img src=\"$Image\" width=\"400\">
</center>
</font></td>
</tr>
<tr>
<td colspan=\"3\" bgcolor=\"#394E7B\"><font face=\"Arial\" size=\"1\" color=\"#ffffff\"><i><u>Extra informatie:</i></u><BR>$Extrainformatie<BR><BR>
Aantal <input type=\"text\" name=\"Aantal\" size=\"2\" style=\"font-family: Arial; font-size: 8pt; text-decoration: none; color: #394E7B; border: 1px solid #394E7B; background-color: #F5ECED\">
<input type=\"submit\" value=\"Toevoegen aan winkelwagen\" name=\"ID\" style=\"font-family: Arial; font-size: 8pt; color: #394E7B; text-decoration: none; float: left; border: 1px solid #394E7B; background-color: #F5ECED\" onclick=\"window.location.href='voegtoe.php3?ID=$ID'\"></font></td>
</tr>
</table></center><BR>
";
}
?>
</body>
</html>
Maar nou ben ik het even helemaal kwijt, als je op die knop klike van toevoegen moet dus het $variabele product in een winkelmandje komen. Dat is eigenlijk het enige stukje code dat ik nodig heb, voor de rest kan ik het zelf wel. heeft iemand dat voor mij? of iemand een link?
828 views