Results 1 to 2 of 2

Thread: Little Help Tool

  1. #1
    Join Date
    Nov 2006
    Posts
    99
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Little Help Tool

    OK, so obviastly some people have javascript disabled, their browser doesn't support JS, or anything else like that. And i was noticing that on DD's "tool" page at the bottom it says "Your IP is...." ad your Your browser user agent....." So I am wondering is their an HTML/PHP snippets you could add to your source so that it runs through a series of if/then commands to decide whether to load a JS "filled" page or a plain "non-JS" page. I guess this could go in either the PHP forums or the HTML. So MODS do what you please with this thread...

    Thanks
    -GT

  2. #2
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    You can't, to my knowledge, check if javascript is enabled through other languages, including php.

    The way to do that is to use Javascript to check.

    If the javascript checks and works, then it will either redirect or set a cookie or just change the page to the "javascript" version, and if the javascript does not work, it won't be able to check and it will fail, thereby not doing anything to the page.

    There might be more complex ways as well...

    As for the other things, look here:
    http://us3.php.net/manual/en/reserved.variables.php
    (Lots of things under $_SERVER should help.)
    and for example, <?php echo $_SERVER['REMOTE_ADDR']; ?> for IP.
    Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

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
  •