我刚刚为 joomla 2.5 创建了一个模块计算器。我想将用户输入的信息发送到一个电子邮件地址
<div class="formRow">
<label id="jform_varListCarburant-lbl" for="jform_varListCarburant" class=""><?php echo JText::_("MOD_MODULESCASCODEVIS_EN_LIGNE_VARLISTCARBURANT"); ?></label>
<select id="jform_varListCarburant" name="jform[varListCarburant]" class="">
<option value="0" selected="selected" <?php if($varListCarburant=="0") echo "selected=\"selected\"" ?>><?php echo JText::_("Choisir"); ?></option>
<option <?php if($varListCarburant=="1") echo "selected=\"selected\"" ?> value="1">Essence</option>
<option <?php if($varListCarburant=="2") echo "selected=\"selected\"" ?> value="2">Diesel</option>
</select>
</div>
计算器的变量:
$varListCarburant = isset($form["varListCarburant"]) ? $form["varListCarburant"] : "";
$varListCarburant = preg_replace('/[^0-9.\-]/', '', str_replace(',', '.', $varListCarburant));
$varListPuissance = isset($form["varListPuissance"]) ? $form["varListPuissance"] : "";
$varListPuissance = preg_replace('/[^0-9.\-]/', '', str_replace(',', '.', $varListPuissance));
$varListUsage = isset($form["varListUsage"]) ? $form["varListUsage"] : "";
$varListUsage = preg_replace('/[^0-9.\-]/', '', str_replace(',', '.', $varListUsage));
$varListEtatvoiture = isset($form["varListEtatvoiture"]) ? $form["varListEtatvoiture"] : "";
$varListEtatvoiture = preg_replace('/[^0-9.\-]/', '', str_replace(',', '.', $varListEtatvoiture));