If selected rows is greater than zero or count 1 then redirect another page use if condition in the codeigniter. First select all data from MySQL table and count rows, if count rows greater zero then redirect dashboard page, for example:
<?php if( $select_data->num_rows() >0){ redirect("Controller/dashboard"); }
Question and answer is powered by AnsPress.io