【发布时间】:2014-05-15 18:10:47
【问题描述】:
我在这里得到了我的选择选项:
<tr>
<td><b>Categoria: </b></td>
<td>
<select style="width: 155px;">
<option value="Desktop">Desktop</option>
<option value="Portatil">Portátil</option>
<option value="Periferico">Periférico</option>
<option value="Tablet">Tablet</option>
</select>
</td>
</tr>
我想,在提交表单时,将选定的值放入 php 中的变量中,就像这个例子一样:
$password=$_POST['password']; /* example of what I'm doing at the beggining of the .php file.
我不知道该怎么做。我不知道语法是如何将所选选项用于我想要的变量的。
【问题讨论】:
-
您忘记了
name属性。例如<select name="password">。没有名字,没有提交表单。