Nieuw lid |
|
Assemblagekosten: €40,00subtotaal: €408,00Overzicht van uw optionele componenten
Foutmelding schreef: Warning: mysql_result() [function.mysql-result]: Unable to jump to row 0 on MySQL result index 21 in /home/discogids/domains/disco-gids.nl/public_html/demo/system/pcbuilder/list.php on line 85
Warning: mysql_result() [function.mysql-result]: Unable to jump to row 0 on MySQL result index 22 in /home/discogids/domains/disco-gids.nl/public_html/demo/system/pcbuilder/list.php on line 86
Warning: mysql_result() [function.mysql-result]: Unable to jump to row 0 on MySQL result index 23 in /home/discogids/domains/disco-gids.nl/public_html/demo/system/pcbuilder/list.php on line 87
subtotaal: €0,00
Totaal: €408,00
Bestel deze computer!
In dit stuk code moet het dan fout gaan
//optionele componenten
echo "<h3>Overzicht van uw optionele componenten</h3>";
$opt_totaal = 0;
$basket = $_GET['basket'];
$optidz = explode("v", $basket);
sort($optidz);
$aantal_optidz = count($optidz);
for($i = 0; $i < $aantal_optidz; $i++)
{
$prijs = mysql_result(mysql_query("SELECT prijs FROM pcbuilder_opt WHERE `id` = '".$optidz[$i]."'"),0,0);
$naam = mysql_result(mysql_query("SELECT naam FROM pcbuilder_opt WHERE `id` = '".$optidz[$i]."'"),0,0);
$type = mysql_result(mysql_query("SELECT type FROM pcbuilder_opt WHERE `id` = '".$optidz[$i]."'"),0,0);
if(!empty($prijs))
{
$opt_totaal += $prijs;
echo "<div class='line'><div class='label2'>".$type."</div><div class='label'>".$naam."</div><div class='label2'>€".str_replace(".",",",$prijs)."</div></div><div class='clear'></div>";
}
if($type == 'Besturingssysteem')
{
$OS = 'yes';
}
}
if($OS == 'yes')
{
echo "<div class='label2'></div><div class='label3'> installeren besturingssysteem: €".str_replace(".",",",$installatiekosten)."</div><div class='clear'></div>";
$opt_totaal += $installatiekosten;
}
echo "<div class='label2'></div><div class='label2'></div><div class='label2'>subtotaal: €".number_format($opt_totaal, 2, ',', '')."</div><div class='clear'></div>";
$totaal += $opt_totaal;
echo "<br/>";
echo "<div class='label2'></div><div class='label2'></div><div class='label2'><b>Totaal: €".number_format($totaal, 2, ',', '')."</b></div><div class='clear'></div><br/>";
echo "<div class='label2'></div><div class='label2'></div><div class='label2'><a href=checkout.php?mobo=".$_GET['mobo']."&proc=".$_GET['proc']."&proc_koeler=".$_GET['proc_koeler']."&hdd=".$_GET['hdd']."&geh=".$_GET['geh']."&gfx=".$_GET['gfx']."&optdrv=".$_GET['optdrv']."&voeding=".$_GET['voeding']."&behuizing=".$_GET['behuizing']."&basket=".$_GET['basket']."&totaal=".$totaal.">Bestel deze computer!</a></div>";
?>
</div>
</body>
//optionele componenten echo "<h3>Overzicht van uw optionele componenten</h3>"; $opt_totaal = 0; $basket = $_GET['basket']; $aantal_optidz = count($optidz); for($i = 0; $i < $aantal_optidz; $i++) { { $opt_totaal += $prijs; echo "<div class='line'><div class='label2'>".$type."</div><div class='label'>".$naam."</div><div class='label2'>€".str_replace(".",",",$prijs)."</div></div><div class='clear'></div>"; } if($type == 'Besturingssysteem') { $OS = 'yes'; } } if($OS == 'yes') { echo "<div class='label2'></div><div class='label3'> installeren besturingssysteem: €".str_replace(".",",",$installatiekosten)."</div><div class='clear'></div>"; $opt_totaal += $installatiekosten; } echo "<div class='label2'></div><div class='label2'></div><div class='label2'>subtotaal: €".number_format($opt_totaal, 2, ',', '')."</div><div class='clear'></div>"; $totaal += $opt_totaal; echo "<div class='label2'></div><div class='label2'></div><div class='label2'><b>Totaal: €".number_format($totaal, 2, ',', '')."</b></div><div class='clear'></div><br/>"; echo "<div class='label2'></div><div class='label2'></div><div class='label2'><a href=checkout.php?mobo=".$_GET['mobo']."&proc=".$_GET['proc']."&proc_koeler=".$_GET['proc_koeler']."&hdd=".$_GET['hdd']."&geh=".$_GET['geh']."&gfx=".$_GET['gfx']."&optdrv=".$_GET['optdrv']."&voeding=".$_GET['voeding']."&behuizing=".$_GET['behuizing']."&basket=".$_GET['basket']."&totaal=".$totaal.">Bestel deze computer!</a></div>"; ?> </div> </body>
|