Path: csiph.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: "J.O. Aho" Newsgroups: comp.lang.php Subject: Re: rawurlencode problem Date: Tue, 20 Oct 2015 18:33:44 +0200 Lines: 27 Message-ID: References: <562509b9$0$23834$e4fe514c@news.xs4all.nl> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Trace: individual.net LVh89BJWteExLlsyNYyaygVnAwJNvY0bkhLptLwAqFubZqmCtq Cancel-Lock: sha1:HepvdSlnvW0z00j9Aaq6ymYT6wo= User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 In-Reply-To: <562509b9$0$23834$e4fe514c@news.xs4all.nl> Xref: csiph.com comp.lang.php:15715 On 10/19/2015 05:18 PM, Erwin Moller wrote: > My advice: Simply replace all offending characters (backslashes spaces > etc) that might occur in your $row["name"], and use what is left for id > and #. Would advice against that, say you replace those characters with an empty string, "Dutch House" "DutchHouse" will be the same and you will get an issue. > Alternatively, encode with something else, like: base64 > http://php.net/manual/en/function.base64-encode.php > That way you will get safe characters for id and hash (but not really > readable for most humans). You can use the id from the database instead, sure it's not directly more understandable, but far easier to check which row in the database you are working with and generally shorter too. -- //Aho