RE: [PHP] how to keep spaces in parameters in URL?
| From: | Jeremy Schreckhise | Date: | Mon, 24 Apr 2006 21:55:02 +0000 |
| Subject: | RE: [PHP] how to keep spaces in parameters in URL? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-234641@lists.php.net to get a copy of this message | ||
Try
print("<a href='/index.php?name=$name'>Foo Bar</a>");
Jeremy Schreckhise, M.B.A.
Hello,
==
<?php
$name = 'foo bar';
echo "<a href=/index.php?name=". $name .">Foo Bar</a>"; ?> ==
Then the URL showed up at the bottom border of the browser has 'name=foo'.
What should I do to have 'name=foo bar' in the URL? I tried
htmlspecialchars but did not see any difference.
I'd appreciate any help.
Bing
--
PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:
http://www.php.net/unsub.php