【问题标题】:Radio button switch statements单选按钮开关语句
【发布时间】:2011-12-27 11:23:37
【问题描述】:
    <input type="radio" name="deckung" id="Basis-Deckung" value="737.80" onClick="DisplayPrice()">
    <input name="deckungname" type="hidden" id="StartUp-Deckung" value="StartUp-Deckung">
    <input name="selbstb" type="hidden" id="selbst_startUp" value="500,- EUR">


    <input type="radio" name="deckung" id="Standard-Deckung" value="1368.50" onClick="DisplayPrice()">
    <input name="deckungname" type="hidden" id="Standard-Deckung" value="Standard-Deckung">  
    <input name="selbstb" type="hidden" id="selbst_standard" value="1.500,- EUR">       



    <input type="radio" name="deckung" id="Premium-Deckung" value="1785.00" onClick="DisplayPrice()">
    <input name="deckungname" type="hidden" id="Premium-Deckung" value="Premium-Deckung">
    <input name="selbstb" type="hidden" id="selbst_premium" value="2.000,- EUR">

大家好,

我有一个很大的问题,我想将deckung 字段下的两个隐藏字段的值转移。

    if 
    {
    $deckung == '737.48';
        echo 'deckungsname=StartUp-Deckung;  selbstb='500,-';
    }
    elseif $deckung == '1368.50';
    { 
            echo 'deckungsname=Standard-Deckung;  selbstb='1.500,- EUR';
    }
    elseif $deckung == '1785.00';
    { 
            echo 'deckungsname=Premium-Deckung;  selbstb='2.000,- EUR';
    }

希望我能解释一下我想做什么!

可以在这里查看表格:Formular

【问题讨论】:

    标签: forms if-statement switch-statement


    【解决方案1】:
    $deckung = $_POST['deckung']; if($deckung == '737.48') { echo "deckungsname=StartUp-Deckung; selbstb=500,-'"; } elseif ($deckung == '1368.50') { echo "deckungsname=标准-Deckung; selbstb=1.500,- EUR"; } elseif ($deckung == '1785.00') { echo "deckungsname=Premium-Deckung; selbstb=2.000,- EUR"; }

    【讨论】:

      猜你喜欢
      • 2013-07-21
      • 1970-01-01
      • 2012-11-21
      • 2016-08-04
      • 2020-10-19
      • 1970-01-01
      • 2012-09-18
      • 1970-01-01
      • 2021-11-26
      相关资源
      最近更新 更多