#1
  1. Full Access
    Devshed Regular (2000 - 2499 posts)

    Join Date
    Jun 2000
    Location
    London, UK
    Posts
    2,019
    Rep Power
    17
    I've noticed on some sites that people are passing variables to HTML files using the GET method. How can you set up HTML files to accept variables? Or have they just set their server up so that all .html files get parsed by the PHP/Perl/whatever engine?

    --------------------------------------------
    Alex
    (http://www.alex-greg.co.uk)
  2. #2
  3. No Profile Picture
    Apprentice Deity
    Devshed Loyal (3000 - 3499 posts)

    Join Date
    Jul 1999
    Location
    Niagara Falls (On the wrong side of the gorge)
    Posts
    3,237
    Rep Power
    19
    There .html files are being parsed. Either that or the query string is meaningless.
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Aug 2000
    Location
    Indiana
    Posts
    614
    Rep Power
    16
    No, they're passing the variables onto a cgi script. if you use:
    <!--#exec cgi="/cgi-bin/script.pl" -->
    Then any variable pass through the html file will be passed to the cgi script too.
  6. #4
  7. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2000
    Location
    Seattle, WA,USA
    Posts
    84
    Rep Power
    15
    Wow, I've learning something new and useful.

    ------------------
    Don't let school interfere with your education.
    --Mark Twain
  8. #5
  9. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2000
    Posts
    114
    Rep Power
    15
    I've never actually seen anyone use this, but you can use javascript to access a query string completely on the client side.
  10. #6
  11. Banned (not really)
    Devshed Supreme Being (6500+ posts)

    Join Date
    Dec 1999
    Location
    Brussels, Belgium
    Posts
    14,643
    Rep Power
    4492
    If you tell it to execute a PHP file, will the variables also be passed to it?

    That would be interesting...
  12. #7
  13. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2000
    Location
    Newark, DE, USA
    Posts
    39
    Rep Power
    15
    They can force the webserver to parse any documents being sent to the client for php. For example, with the apache web server, you would add the .html extension to the directive in httpd.conf which instructs the web server to look for php code within the document:
    AddType application/x-httpd-php .php .html

    ------------------
    ~Chris
  14. #8
  15. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2000
    Posts
    24
    Rep Power
    0
    <BLOCKQUOTE><font size="1" face="Verdana,Arial,Helvetica">quote:</font><HR>Originally posted by billyo:
    I've never actually seen anyone use this, but you can use javascript to access a query string completely on the client side.[/quote]

    if you want to see Javascript beign used you can look at http://www.aoeex.com/current/random.html

    It is something I made a while ago to help me refresh my JS skills so i could write my JS tutorial

    ------------------
    Aoeex,

    -http://www.aoeex.com

IMN logo majestic logo threadwatch logo seochat tools logo