SitePoint Sponsor

User Tag List

Results 1 to 3 of 3

Hybrid View

  1. #1
    SitePoint Zealot
    Join Date
    Aug 2001
    Posts
    114
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Advantage of urlencode()?

    I have built a big (to me anyway) php/mysql site (bisentertainment.com), and I do a lot of variable passing through the url. I have just stumbled upon this function, urlencode(). what is the usage for it as opposed to

    <a href="page.php?var=value">link</a>


    -thanks.
    __________________________
    http://www.michaelsica.com

  2. #2
    SitePoint Zealot theFinn's Avatar
    Join Date
    Oct 2000
    Location
    Edmonton
    Posts
    102
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Its usfull if you're variable is a string of text.

    For example a URL like this would be invalid: http://www.somesite.com/myscript.php?thing=a string of text

    Doing a urlencode() on the text would yield this: http://www.somesite.com/myscript.php?thing=a+string+of+text

    A valid URL.
    - theFinn
    Creator and Project Manager, phpBB
    http://www.theFinn.net
    http://www.tarotclass.com

  3. #3
    SitePoint Zealot
    Join Date
    Aug 2001
    Posts
    114
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    oooohhhhhhhh, thanks!
    __________________________
    http://www.michaelsica.com


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •