2013-10-15 58 views
0

空白,我在一個網站得到這個形式了。我無法從select變量中獲取值,以便通過php上的變量收集。無論選擇什麼選項,它都會在PHP中顯示爲空白。值顯示了PHP變量

每隔輸入值被準確地收集這是PHP變量。

我相信我檢查了足夠的錯別字,未關閉的標籤或丟失字符。難道是某種規則的約<選擇>標記,我不知道的?

的HTML

<form method="post" action="contact.php" name="contactform" id="contactform" autocomplete="off"> 
    <fieldset> 
     <label id="sendtolabel"><span>Send To:</span></label> 
     <select name="select" id="select"> 
      <option value="1">Option 1</option> 
      <option value="2">Option 2</option> 
      <option value="3">Option 3</option> 
      <option value="4">Option 4</option> 
     </select> 
     <label for="name" accesskey="U"><span class="required">Name</span></label> 
     <input name="name" type="text" id="name" size="30" title="name" /> 
     <label for="email" accesskey="E"><span class="required">Email</span></label> 
     <input name="email" type="text" id="email" size="30" title="email" /> 
     <label for="comments" accesskey="C"><span class="required">Comments</span></label> 
     <textarea name="comments" cols="40" rows="3" id="comments" title="comments"></textarea> 
     <input type="submit" class="submit" id="submit" value="Submit" /> 
    </fieldset> 
    </form> 

的PHP

$select = $_POST['select']; 
$name = $_POST['name']; 
$email = $_POST['email']; 
$comments = $_POST['comments'] 
+0

首先嚐試調用不是「選擇」其他的東西