I have a form that queries a SQL database with a stored procedure and generates TOP 100 results. I would like to put a dropdown box next to the search button to choose how many results to display.
I imagine doing this by running a different stored procedure for each amount (i.e. TOP 100, TOP 200, TOP 300 etc.) so I want to change the $query variable being executed by the 'Search' button to run each of these stored procs.
Can PHP do this or do I need javascript/AJAX?
Example of my code:
echo '<input class="btn btn-primary btn-lg active" type="submit" name="search" value="Search"> <br><br>';
$query = "EXEC dbo.sp_HeaderSearch100";
Any help would be greatly appreciated! Thanks