SitePoint Sponsor |
|
User Tag List
Results 1 to 3 of 3
-
Feb 1, 2001, 09:43 #1
- Join Date
- Nov 2000
- Location
- Ont, Canada
- Posts
- 234
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
I'm using the <a> tag to pass a php variable to another page. The varaible is a text string that could include spaces. example:
$var = 'aaa bbb';
<A HREF="newpage.php?var=<?php echo($var); ?></A>
IE handles this fine receiving $var on newpage.php as
'aaa bbb' but Netscape only receives $var as 'aaa'.
I know the the URL and passed variables should be a continious string hence the reason for ? and & to attach the string but how do you handle an assigned varaible that has white space in the string?Brian Smith
www.mylittlechampion.com
-
Feb 1, 2001, 09:49 #2
- Join Date
- Jul 1999
- Location
- Derbyshire, UK
- Posts
- 4,411
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Try:
$var = 'aaa bbb';
<A HREF="newpage.php?var=<?php echo(urlencode($var)); ?></A>
It is a deviation from standards for IE to support variables with space in them.Karl Austin :: Profile :: KDA Web Services Ltd.
Business Web Hosting :: Managed Dedicated Hosting
Call 0800 542 9764 today and ask how we can help your business grow.
-
Feb 1, 2001, 10:39 #3
- Join Date
- Nov 2000
- Location
- Ont, Canada
- Posts
- 234
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Thanks Karl. EI's deviations from standards seem more flexable on the surface but don't help in the end. They don't make our lives easier do they?
Brian Smith
www.mylittlechampion.com
Bookmarks