单选按钮窗体不发送数据.什么是正确的语法


radio button form not sending data. what is the proper syntax?

我正在发布的这个单选按钮形式的正确语法是什么。该表单在没有单选按钮的情况下工作正常,只有当我添加它们时,我才会收到一条错误消息,说,未定义的变量:where_to_search

<form action="" method="POST" >
<div class="control-group">
    <label class="control-label">Search By:</label>
        <div class="controls">
            <label class="radio">
                <input type="radio" name="where_to_search" id="optionsRadios1" value="1" checked>
                     Group Name
            </label>
                <label class="radio">
            <input type="radio" name="where_to_search" id="optionsRadios2" value="2">
                     Group Description
                </label>
            </div>
     </div>   

<input class="span2" name="keywords" id="appendedPrependedInput" size="15" placeholder="Search groups.." type="text"/><button class="btn" value="Go" type="submit">Go!</button>


</form>

尝试:选中="已检查"和<输入类型>

您需要使用 $_POST 引用变量:

$_POST['where_to_search']