dear all,
i am coding a search form.
it contains several textbox..
user can enter some criteria to search mysql db..
it can be "alex ho" <--- contains space ..
my result form can split into several pages based on the number of result pages..
say if >30 rows.. has next page url..
here is the partial next page url, cos need to pass the criteria every time without use session
$footer .= "search.php?gname=$gname"
the problem is , if the criteria contains space , the $footer will truncate..
it becomes
$footer .="search.php?gname=alex"
instead of
$footer .="search.php?gname=alex ho"
actually i solve the problem by using str_replace(" ","%20",$gname);
but i am not sure any other special character will crash my code.
may i know if there any exsiting "class" or function can process the passed url.. so that any unpredicated problems can be fixed.
thx
alex