I have a screen that shows database records. If the customer clicks on a record I go to a screen that shows the record.
I need to pass the a url. Looks like:
http://www.mydomain.com/categories.php?Mode=Update&category=Children's Books.
I am trying to pass a category name to the second program. $category = "Children's Books".
It stops at the first ' . If I use addslashes(category) it gets to the first space in the category part of the line.
I have tried urlencode($category) but that didn't work.
What function do I use or how would I handle the problem?
The line I am using looks something like this.
echo '<td align="top">' . '<a href=categories.php?Mode=Update&category='. urlencode($row['category']) . ">" . stripslashes($row['category']) . "</a></td>\n";
It's the <a> part that I cannot get to work.
Any help would be greatly appreciated.
TIA