passing special arguments in a URL
Posted: Fri Jul 04, 2003 3:22 pm
I'm using a table to sort some data from a mySQL database. When you click the header of the table, it sorts the table by that field. To do this, when a header is clicked it passes 2 value: the current mySQL query that produced the table, and the field it's supposed to sort by.
Example of one of the table headers:
<a href="allreps.php?sort=name&searchstring=<? echo "$searchstring"; ?>">Name</a>
and $searchstring would look something like this:
"WHERE lname LIKE '%doe%' AND mgnum LIKE '%58%'"
But when passed, something is changing the string and interpretting it as:
"WHERE lname LIKE '%doe%' AND mgnum LIKE 'X%'"
The %58 turns into an X... if I was to pass %59, it'd turn it into a Y. How can I get it to pass the string and not try to interpret it?
Any suggestions would be appreciated.
Example of one of the table headers:
<a href="allreps.php?sort=name&searchstring=<? echo "$searchstring"; ?>">Name</a>
and $searchstring would look something like this:
"WHERE lname LIKE '%doe%' AND mgnum LIKE '%58%'"
But when passed, something is changing the string and interpretting it as:
"WHERE lname LIKE '%doe%' AND mgnum LIKE 'X%'"
The %58 turns into an X... if I was to pass %59, it'd turn it into a Y. How can I get it to pass the string and not try to interpret it?
Any suggestions would be appreciated.