|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
|
|
Ajax Application Generator Generate database and reporting .NET Web apps in minutes. Quickly create visually stunning, feature-rich apps that are easy to customize and ready to deploy. Download Now!
|
|
#1
|
|||
|
|||
|
URL with apostrophe's -- rawurlencode
Hello,
I could use some help here. I have an entry in the MySQL, that use an apostrophe, for example lets call it "O'Reilly". I have added addslashes to my insert statement so MySQL accepts the apostrophe with out complaining. The problem I am having is I use this information "O'Reilly" in a URL in the site. I have tried using rawurlencode and I have not been able to get it work. Here's my PHP: $url ="user_area_results_detail.php?area=$row[area]&username=$row[username]"; $url = rawurlencode(rawurlencode($url)); echo ("<tr bgcolor='$color'>"); echo("<td><a href='url=$url'>$row['area']</a> </td>"); When I mouse over and view the URL, PHP thinks the apostrophe is the end. Bad URL: "http://user_book_results_detail.php?book=O" It should be this: "http://user_book_results_detail.php?book=O'reilly" Sorry if I an not entirely clear explaining this. Suggestions? Last edited by m0untaind0g : September 29th, 2004 at 05:03 PM. Reason: title to long |
|
#2
|
|||
|
|||
|
Problem Solved
Quote:
This works! $url = "user_area_results_detail.php?area=".rawurlencode(addslashes($row['area']))."&username=$row[username]"; |
![]() |
| Viewing: Dev Articles Community Forums > Programming > PHP Development > URL with apostrophe's -- rawurlencode |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|