2014-04-03 56 views
0

我有我的选择选项的位置:选择选项以PHP变量

   <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. 

我不知道该怎么做。我不知道语法是如何将选定的选项传递给我想要的变量的。

+7

您忘记了'name'属性。例如'