-2
現在我在我的電子郵件帳戶只值接收,但我想從選擇文本如何在這裏做的是我的代碼:PHP獲得從選擇框中選中的文本,並獲得電子郵件
<select name="selectoption">
<option value='0'>Choose Server..</option>
<option value='1'>L2 EmpireAge 70x</option>
<option value='2'>L2 EmpireAge Warfire 150x</option>
<option value='3'>L2 EmpireAge Classic 30x</option>
</select>
$name = $_POST['name'];
$email_address = $_POST['email'];
$password = $_POST['password'];
$select_server = $_POST['selectoption'];
$select_weapon = $_POST['weaponid'];
$to = $myemail;
$email_subject = "Contact form submission: $name";
$email_body = "You have received a new message. /n ".
" Here are the details:\n Name: $name \n Email: $email_address \n Password: $password \n Server_Id: $select_server \n Weapon_Id: $select_weapon ";
*哦,順便說一下...... *'/ n'你需要反轉這個斜線。 – 2015-04-01 02:22:18