Welcome to WebmasterWorld Guest from 18.104.22.168
i use this statement:
$sql = 'SELECT * from registration_table ORDER by last_name ASC';
I have several other fields that are displayed also, First Name, Address, City.....etc...etc.
How can i make this table sortable by any column that my users wnat?
Can i do that with submit buttons?
$ORDER_BY = $_REQUEST['field_name'];
$sql = "SELECT * from registration_table ORDER by ". $ORDER_BY ." ASC";
To secure a switch
You may use for example:
$clean_state = array();
$clean_state['state'] = ($_POST['state']);
echo" <h1>We are aware of the tentative intrusion in State options</h1><br>";
Hidden fields are vulnerable as well;
you need to verify that the data received is the data expected
Hidden fields are irrelevant here. Use a switch to explicitly declare input (like the example with the $clean_state array above) and then default if none are met. In an inconsequential situation like this thereâ€™s no need and/or point to break from the system to tell someone you are aware of their mischief.