gpt4 book ai didi

php - 将所有 3 个 $_post 合并到 1 个变量

转载 作者:行者123 更新时间:2023-12-02 18:05:18 25 4
gpt4 key购买 nike

JSFiddle

我想将所有 3 个 $_POST 合并为 1 个变量,但月份日期不会显示,这是怎么回事?

这是代码:

<div id="register-birth-date">

<input type="number" name="register-day" placeholder="DATE">

<select id="register-month">
<option value="00">Mouth</option>
<option value="01">January</option>
<option value="02">February</option>
<option value="03">March</option>
<option value="04">April</option>
<option value="05">May</option>
<option value="06">June</option>
<option value="07">July</option>
<option value="08">August</option>
<option value="09">September</option>
<option value="10">October</option>
<option value="11">November</option>
<option value="12">December</option>
</select>

<input type="number" name=" " placeholder="YEARS">

</div>
$air_user_registered_date = $_POST['register-day']."/".$_POST['register-month']."/".$_POST['register-years'];

最佳答案

您需要将 name 属性添加到月份的选择框和年份的输入框

<div id="register-birth-date">

<input type="number" name="register-day" placeholder="DATE" />

<select name="register-month" id="register-month">
<option value="00">Mouth</option>
<option value="01">January</option>
<option value="02">February</option>
<option value="03">March</option>
<option value="04">April</option>
<option value="05">May</option>
<option value="06">June</option>
<option value="07">July</option>
<option value="08">August</option>
<option value="09">September</option>
<option value="10">October</option>
<option value="11">November</option>
<option value="12">December</option>
</select>

<input type="number" name="register-years" placeholder="YEARS" />
</div>

JSFiddle

关于php - 将所有 3 个 $_post 合并到 1 个变量,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29819755/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com