Hallo leute,
ich bin neue im Welt php, ich habe folgende Probleme:
Ich ahbe so weit mit hilfe 100 scripte oder Online Bücher geschafft so weit zukommen 3 tage und nächte Arbeit . jetzt die letzte script kann ich nicht mehr und ich bitte ums hilfe.
Aufgabe: script sollte breite und höher + Vorbereitung sachen von ein Artikel berechnen.
meine script:
zu mein Problem ich weiß nicht was soll ich in der Datei(calculator.php) schreiben? kein plan?
und in calculator.php Datei sieht so aus
Obwohl weiß ich da nicht funktioniert)
aber leider sehe ich keine ergebnis. was mache ich falsch? bitte hilfe mein kopf tut weh schon ... komme ich nicht weiter
ich bin neue im Welt php, ich habe folgende Probleme:
Ich ahbe so weit mit hilfe 100 scripte oder Online Bücher geschafft so weit zukommen 3 tage und nächte Arbeit . jetzt die letzte script kann ich nicht mehr und ich bitte ums hilfe.
Aufgabe: script sollte breite und höher + Vorbereitung sachen von ein Artikel berechnen.
meine script:
Code:
<html> <head> </head> <body> <form action="calculator.php" method="GET" name="savedata"> <input type="hidden" name="lang" value="de" /> <input type="hidden" name="id" value="46"> <input type="hidden" name="parent_id" value="17"> <input type="hidden" name="content_id" value="0"> <input type="hidden" name="versand" value="1"> <input type="hidden" name="basket_id" value="" /> <input type="hidden" name="zsumme" value="0"> <input type="hidden" name="task" value="calculate"> <table border="0" cellpadding="0" cellspacing="0" class="table450"> <tr> <td width="450" height="14"> <table width="370" border="0" cellspacing="0" cellpadding="0" class="normal"> <tr> <td class="black">Menge <input type="text" name="menge" style="vertical-align:middle;width:40px;margin-right:3px;" class="textinput_number" value="1"/> Stücke</td> <td align="right" class="black">Breite <input type="text" name="breite" style="width:100px;vertical-align:middle;margin-left:3px;margin-right:3px" class="textinput_number" value="" /> <select name="mass_breite" style="width:50px;vertical-align:middle" > <option value="m" >m</option> <option value="cm" >cm</option> </select></td> </tr> <tr> <td> </td> <td align="right" class="black">Hoehe<input type="text" name="hoehe" style="width:100px;vertical-align:middle;margin-left:3px;margin-right:3px" class="textinput_number" value="" /><select name="mass_hoehe" style="width:50px;vertical-align:middle;" > <option value="m">m</option> <option value="cm">cm</option> </select> </td> </tr> </table></td> </tr> </table> <br /> <table border="0" cellpadding="0" cellspacing="0"> <tr><th>Verarbeitung</th></tr> <tr> <td width="450" height="14" valign="middle"> <table width="410" border="0" cellspacing="0" cellpadding="0" class="normal"> <tr> <td class="black">Material</td> <td width="250" align="right" class="black"><select name="material" style="width:250px" onChange="showprint(); testprice();"> <option value="1" >Artikel 01</option> <option value="2" >Artikel 02</option> <option value="3" >Artikel 03</option> <option value="4" >Artikel 04</option> <option value="5" >Artikel 05</option> <option value="6" >Artikel 06</option> </select></td> </tr> <tr> <td class="black">Druck</td> <td align="right" class="black"><select name="druck" style="width:250px"></select></td> </tr> <tr> <td class="black">Aufhängungsart</td> <td align="right" class="black"> <select name="vorbereitung" style="width:250px"> <option value="3" >Vorbereitung 01 </option> <option value="4" >Vorbereitung 02</option> <option value="5" >Vorbereitung 03</option> </select></td> </tr> </table></td> </tr> </table> <br /> <table border="0" cellpadding="0" cellspacing="0" class="table450"> <tr><th>Preise</th></tr> <tr> <td width="450"> <table width="370" border="0" cellspacing="0" cellpadding="0" class="normal"> <tr> <td width="110" class="black">Preis pro Stück<a href="#" onClick="infowindow('material')"></a></td> <td align="left" class="black"> <input type="text" name="einzelpreis" style="width:90px" readonly="readonly" class="textinput_number" value="EUR 0,00" /></td> <td align="right" class="black">Preis/m²</td> <td width="95" align="right" class="black" style="padding-right:5px"><input type="text" name="qmprice" style="width:90px" readonly="readonly" class="textinput_number" value="EUR 0,00"></td> </tr> <tr> <td class="black">Gesamtpreis <a href="#" onClick="infowindow('druck')"></a></td> <td width="90" align="right" class="black"><input type="text" name="zwischensumme" style="width:90px" readonly="readonly" class="textinput_number" value="EUR 0,00" /></td> <td colspan="2" rowspan="2" align="right"><input type="button" class="taste_grw_100" onClick="calculate()" value="berechnen" /></td> </tr> <tr> <td colspan="2" class="black" style="font-size:9px"> </td> </tr> </table></td> </tr> </table> </form> <script>showprint()</script> </body> </html>
und in calculator.php Datei sieht so aus

Code:
<?php $erg = $bereite + $hoehe; echo "Die Summe von $breite und $hoehe ist $erg"; ?>

Kommentar