You need to update your SQL query:
$result = mysql_query("SELECT patientname,RN,IC,age,gender,race,discipline,dateofincident,timeofincident,dateofreport,monthofreport,namastaff,brief,action,status,namelocation,category
FROM registerstaff,location,incident WHERE $searchtype LIKE '%$searchvalue%' and location.id=registerstaff.location_id and incident.id=registerstaff.incident_id";
to include "limit". Take a look at my SQL query from my pagination example code and compare the two.