A web page has a list of choices, e.g.
....
At the end of the page there is a buton to run an sql query and return the results ON THE SAME PAGE:
The problem is that php warns that mychoice is undefined.
Am I missing something here?
....
Code:
<input type="text" name="mychoice" value="" />
....
Code:
...
<th>
<FORM method="post">
<input type="submit" name="runquery" value="Run Query">
</FORM></th>
<?php if ( isset($_POST['runquery'])){
$mychoice=htmlspecialchars($_POST["mychoice"]); [b]//!!!! undefined [/b]
if($mychoice ){$sqlw .=" AND CHOICE_1 LIKE '".$mychoice ."%' ";}
....
?>
The problem is that php warns that mychoice is undefined.
Am I missing something here?