I made this simple radio group below but I'm having some difficulty calling it in PHP.
<form id="form1" name="form1" method="get" action="pre_process.php">
<p>
<input name="q" type="text" size="80"/>
</p>
<p>
<input type="submit" id="search_button" />
</p>
<p>
<label>
<input type="radio" name="SearchFormat" value="0" id="SearchFormat_0" />
Agreggated</label>
<br />
<label>
<input type="radio" name="SearchFormat" value="1" id="SearchFormat_1" />
Non-Aggregated</label>
I'm using the following code but I get an error of undefined index: SearchFormat
if($_GET["SearchFormat"]==0)
{
do stuff...
Can somebody tell me what I'm doing wrong?
Thanks
$_GET
then make sure you set the form'smethod
attribute toget
:<form method="get">