[thelist] PHP encoding &s in a URL

Hassan Schroeder hassan at webtuitive.com
Mon Sep 1 13:18:38 CDT 2003


fstorr wrote:

> I've got a MySQL db and am running PHP.  I'm trying to get a link like:
> 
> <a href="results?q=D&T">D&T</a>

<a href="results?q=D%26T">D&T</a> seems to work in a simple test --
at least PHP returns `D&T` as the value of `q` so presumably that's
what will be passed into the SQL query...

HTH!
-- 
Hassan Schroeder ----------------------------- hassan at webtuitive.com
Webtuitive Design ===  (+1) 408-938-0567   === http://webtuitive.com

                           dream.  code.





More information about the thelist mailing list