I am writing a php script that search a table in database. The result is limit for 5 records per page. My problems begin when i hit next button and it will display an error message.
So how can i display the search result on the next pages?
Thanks.
$query = "SELECT * FROM $user_tablename WHERE ";
if($keyword)
{
if($value==id){
$query .=" userid LIKE '$keyword%' $order_by_str $sort_order_str $limit_str";
}
if($value==name){
$query .=" fullname LIKE '$keyword%' $order_by_str $sort_order_str $limit_str";
}
}
$result = mysql_query($query);
if(!$result) error_message(sql_error());