Results 1 to 5 of 5

Thread: Parsing url

  1. #1
    Guest
    PHP is better for this kind of thing.

  2. #2
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    Yeah - why does it specifically need to be client-side?
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

  3. #3
    Hyperactive Member
    Join Date
    Mar 2000
    Posts
    292
    "People who think they know everything are a great annoyance to those of us who do."

  4. #4
    Guest
    Sorry, I would have said more, but at that time I was at school, and the teacher was nearing......

    PHP is so much better for this kind of thing, because if the register_globals "Variable" is turned on in php.ini, you can access the query string like this

    Code:
    For example, if the URL is
    http://www.url.com/page.php?hello=no
    
    the code to access it would be
    
    <?
    if (isset("$hello")!=0) {
    //its true, display the value
    echo $hello;
    }
    }
    ?>
    actually you don't need the isset, that just makes sure its there,
    if you don't use isset, and its not there, there are no errors, just no display
    
    <?
    //if the url is just http://www.url.com/page.php instead of ..?hello=no 
    then no output will be displayed.
    echo $hello
    ?>
    and thats it

    [Edited by denniswrenn on 09-29-2000 at 07:48 PM]

  5. #5
    Hyperactive Member
    Join Date
    Mar 2000
    Posts
    292
    It seems he's looking for a client side solution, so this should work.
    "People who think they know everything are a great annoyance to those of us who do."

Posting Permissions

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



Click Here to Expand Forum to Full Width