Ankündigung

Einklappen
Keine Ankündigung bisher.

Script calculator

Einklappen

Neue Werbung 2019

Einklappen
X
  • Filter
  • Zeit
  • Anzeigen
Alles löschen
neue Beiträge

  • Script calculator

    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:
    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&nbsp;&nbsp;
                <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>&nbsp;</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">&nbsp;</td>
              </tr>
            </table></td>
        </tr>
      </table>
     
    </form>
    <script>showprint()</script>
    </body>
    </html>
    zu mein Problem ich weiß nicht was soll ich in der Datei(calculator.php) schreiben? kein plan?
    und in calculator.php Datei sieht so ausObwohl weiß ich da nicht funktioniert)
    Code:
    <?php
       $erg = $bereite + $hoehe;
       echo "Die Summe von $breite und $hoehe ist $erg";
    ?>
    aber leider sehe ich keine ergebnis. was mache ich falsch? bitte hilfe mein kopf tut weh schon ... komme ich nicht weiter

  • #2
    Du musst erstmal $breite und $hoehe aus dem Formular abfangen mit

    $breite = $_GET['breite'];
    $hoehe = $_GET['hoehe'];

    Kommentar


    • #3
      Hallo drieling,
      Danke für schnelle Hilfe klasse
      Zitat von drieling Beitrag anzeigen
      Du musst erstmal $breite und $hoehe aus dem Formular abfangen mit

      $breite = $_GET['breite'];
      $hoehe = $_GET['hoehe'];
      du meinst in Datei calculator.php soll ich schreiben:
      Code:
      <?php
      $breite = $_GET['breite'];
      $hoehe = $_GET['hoehe'];
       
      $erg = $breite + $breite;
      echo "Die Summe= $erg";
      ?>

      Kommentar


      • #4
        Wenn du Hilfestellung nicht verstehst, dann sag doch was statt einfach ins nächste Forum zu rennen und dort die selbe Frage nochmal zu stellen. Sowas ist einfach nur ....

        Script calculator - phpfriend.de
        [URL="https://www.quizshow.io/"]Create your own quiz show.[/URL]

        Kommentar


        • #5
          Im anderen Forum scheint das Problem ja gelöst zu sein.

          Für das nächste mal: 2x der selbe Post in verschiedenen Foren sieht man nicht gerne, das verärgert meistens die Leute die dir helfen wollen

          Kommentar

          Lädt...
          X