Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Back End Space in URL not working

  • This topic is empty.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #161356
    amidigital
    Participant

    I am pulling company names from a url like this.

    http://website.com/?value=ShellLubricants

    <?php $name = ucfirst( htmlspecialchars( $_GET['value'] ) ); print "$name would like to"; ?>

    I would like a space between the words.

    My best guess is to add %20 http://website.com/?value=Shell%20Lubricants

    That doesnt work.

    Thank You!

    #161362
    chrisburton
    Participant

    How would you know where to place the space for each unique value unless you specify it?

    #161407
    amidigital
    Participant

    I would specify each link like…
    value=Shell%20Lubricants
    value=Smith%20Transport

    But I don’t know how because %20 does not work.

    #161437
    __
    Participant

    But I don’t know how because %20 does not work.

    %20 is the urlencoding of a nonbreaking space. If your query string contains value=Smith%20Transport, then $_GET["value"] will contain “Smith Transport”. Is this not what you are trying to accomplish? What do you mean by “does not work”?

Viewing 4 posts - 1 through 4 (of 4 total)
  • The forum ‘Back End’ is closed to new topics and replies.