Hallo
Ik wilde iets laten berekenen met een selecteer menu.
Voor de invul tabel heb ik deze code
<?
if ($type_service == "Bezorgen"){
$totaal = round($totaal_product * 1.10);
} else {
$totaal = $totaal_product;
}
if ($betalingsmethode == "Creditcard"){
$totaal = round($totaal_product * 1.05));
} else {
$totaal = $totaal_product;
}
?>
daarna op de invul tabel
<?
<tabel>
<tr>
<td>Te betalen</td><td>:</td>
<td>
<?php
$totaal = $totaal_product;
if ($type_service == "Bezorgen"){
$totaal = round($totaal_product * 1.10);
}
if ($betalingsmethode == "Creditcard"){
$totaal = round($totaal_product * 1.05);
}
echo "<b>€ ".($totaal)."</b>";
?>
</td>
</tr>
</table>
?>
De code werkt Niet als ik "Bezorgen" selecteer (10% wordt Niet bijgeteld) wel als ik "Creditcard" selecteer.
Weet iemand toevallig waar de fout zit? Kan iemand mij helpen?
Alvast bedankt
1.008 views