Einzelnen Beitrag anzeigen
  #5  
Alt 15.02.2007, 13:47:43
damohsta damohsta ist offline
Anfänger
 
Registriert seit: Oct 2006
Beiträge: 68
AW: Hilfe bei switch anweisung und auswahlfeldern gesucht

Kann mal einer drüber schauen ob ich mich auf dem richtigen weg befinde? ;)

PHP-Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
       "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>Angebotsseite</title>
</head>
    <body>
        <?php 
        
//datei: preisberechnung.php ....dann in ausgelagerter datei....
        
$auswahla = (int) $_post["AuswahlA"]
        
$auswahlb = (int) $_post["AuswahlB"]
        
$Summe $auswahla $auswahlb;
        
        switch(
$_Summe){
            case 
11:
            
$_Preis 100;
            break;
            case 
12:
            
$_Preis 200;
            break;
            case 
13:
            
$_Preis 300;
            break;
            case 
21:
            
$_Preis 400;
            break;
            case 
22:
            
$_Preis 500;
            break;
            case 
23:
            
$_Preis 600;
            break;
        
?>
        
        <table width="288" border="1" cellspacing="2" cellpadding="0">
            <tr>
                <td>Menge</td>
                <td>Art</td>
                <td>Preis</td>
            </tr>
            <tr>
                <td>
                <form action="preisberechnung.php" method="post">
                <select id="AuswahlB" name="AuswahlA" size="1">
                        <option value="1">1000</option>
                        <option value="2">2000</option>
                        <option value="3">3000</option>
                </select>
                </td>
                <td>
                <select id="AuswahlB" name="AuswahlB" size="1">
                        <option value="10">1-farbig</option>
                        <option value="20">2-farbig</option>
                </select>
                </form>
                </td>
                
                <td><input type="text" id="summe" name="summe" readonly size="14"></td>
            </tr>
        </table>
        <td><input type="submit" id="senden" name="senden" readonly size="14"></td>
        <p>
            
        </p>
    </body>

</html>
Mit Zitat antworten