#1
  1. No Profile Picture
    SWiTCH2
    Guest
    Devshed Newbie (0 - 499 posts)
    Hi,
    I have a Select pop-up with list of country names with a variable $Country. I pass this variable using the URL to the next page and it displays fine. When I have a link from page two to page three, the Variable is cut after a space.
    (e.g) Page one I select "United States of America". Page 2 shows it ok. But, on page 3 this variable is only "United" the rest is gone.

    here is the link i use:
    <a href="Response5.phtml?Country=$Country&day=$day&month=$month&year=$year">$day</a>

    Any help is much appreciated.

    Thanks

  2. #2
  3. No Profile Picture
    Rainer
    Guest
    Devshed Newbie (0 - 499 posts)
    i had the same problem when using netscape (msie 5 doesn't seem to have this "problem"). i use a simple $string2 = strtr($string1," ", "_"); to convert all (!) spaces to "_"
    before posting and $string3 = strtr($string4,"_", " "); after.

    hope this works...
  4. #3
  5. No Profile Picture
    Rainer
    Guest
    Devshed Newbie (0 - 499 posts)
    should be: $string3 = strtr($string2,"_", " ");

    sorry
  6. #4
  7. No Profile Picture
    rod k
    Guest
    Devshed Newbie (0 - 499 posts)
    The best way to do this is to urlencode() the variables before using them in the query string. This makes spaces and other characters that are not url friendly acceptable.

Similar Threads

  1. Replies: 1
    Last Post: November 24th, 2003, 06:46 PM
  2. Shrinking strings with white spaces
    By arsenio in forum Perl Programming
    Replies: 4
    Last Post: October 29th, 2003, 10:49 AM
  3. manipulating char * strings
    By infamous41md in forum C Programming
    Replies: 2
    Last Post: June 1st, 2003, 12:48 AM
  4. strings vs. constant strings (what's the difference?)
    By Matthew Doucette in forum C Programming
    Replies: 8
    Last Post: March 7th, 2003, 01:00 PM
  5. submit variables to fields with spaces in the name
    By lukemcd in forum PHP Development
    Replies: 3
    Last Post: September 10th, 2002, 10:21 PM

IMN logo majestic logo threadwatch logo seochat tools logo