Heej mensen,
Na drie dagen heb ik het eindelijk voor elkaar mijn database staat op internet!:) helemaal blij alleen nu loop ik tegen volgend probleem aan. de opmaak!
Ik heb nu zeg maar dit staan:
Id Naam Beschrijving Prijs Plaatje 1 Escape women Geurtje voor de vrouw 39.95 plaatje
Maar het moet zo worden:
Id Naam Beschrijving Prijs Plaatje
1 Escape women Geurtje voor de vrouw 39.95 plaatje
dus zeg maar alles onder een woord waar het bij hoort. ook wil ik een echt plaatje (http://www.sreeb.nl/ict/parfum.jpg) laten tonen onder kolom plaatje.
dit is de code die ik nu heb:
<?php
//DSN-less connectie (code staat in map ip12/php en database in map db):
$dbpad="../../db";
$db="../../db/bounty.mdb";
$db_connstr = "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=". realpath($db)." ;DefaultDir=". realpath($dbpad);
$conn = new COM("ADODB.Connection");
$conn->Open($db_connstr);
$sql = "SELECT id, productnaam, beschrijving, prijs, plaatje FROM producten";
$result = $conn->Execute($sql);
print("
<th width='20%'>Id</th>
<th width='20%'>Naam</th>
<th width='20%'>Beschrijving</th>
<th width='20%'>Prijs</th>
<th width='20%'>Plaatje</th>
");
while (!$result ->EOF)
{
$id=$result->Fields['id']->Value;
$productnaam=$result->Fields['productnaam']->Value;
$beschrijving=$result->Fields['beschrijving']->Value;
$prijs =$result->Fields['prijs']->Value;
$plaatje=$result->Fields['plaatje']->Value;
print ("<tr>
<td width='20%'>". $id . "</td>
<td width='20%'>". $productnaam . "</td>
<td width='20%'>". $beschrijving . "</td>
<td width='20%'>". $prijs . "</td>
<td width='20%'><img src=". $plaatje . "></td>
");
$result->Movenext();
}
?>
Weet iemand hier raad mee? please help me;)
Alvast harstikke bedankt!
groetjes edie
712 views