|
I'm trying to pass a value from a radio button choice - on the same page.
Here is my code for getting user input:
<div id="pnlSpeaks">
<span><input type="radio" name="speaks" value="Y" /></span>
<span><input type="radio" name="speaks" value="N" /></span>
<span><input type="radio" name="speaks" value="" checked/></span>
</div>
And here is the code to get info from submitted input:
$FilterSpeaks = $_POST['speaks'];
Here, I add these values as conditions to a mysql query:
if (isset($_POST['submit']))
{ $FilterSpeaksQuery = " AND speaks = '" . $FilterSpeaks . "'";
$FilterSet = TRUE; }
Since the mysql query didn't work, I tried just printing $FilterSpeaksQuery.
And here is where I think it should print, but it doesn't:
print "$FilterSpeaksQuery";
Appreciate any help.
|