Passing Parameters to HTML Pages

Discussion in 'HTML & Website Design' started by rdins, Apr 22, 2009.

  1. #1
    I need to pass parameters to pages on my website like so:

    www.mywebsite/page1/?id=XXX

    I want to capture the "XXX" when the page is opened.

    I tried using a JAVA script but the browser issues a warning when the page opens. I certainly don't want my users seeing this.

    Anyone got any ideas?
     
    rdins, Apr 22, 2009 IP
  2. as3 programmer

    as3 programmer Guest

    Messages:
    2
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    It would help if you told us what the warning shows.
     
    as3 programmer, Apr 22, 2009 IP
  3. Kerosene

    Kerosene Alpha & Omega™ Staff

    Messages:
    11,366
    Likes Received:
    575
    Best Answers:
    4
    Trophy Points:
    385
    #3
    Use PHP. Create index.php in your page1 directory, and paste this into it.

    <?
    $your_variable = $_GET['id'];
    echo $your_variable;
    ?>
     
    Kerosene, Apr 22, 2009 IP
  4. unigogo

    unigogo Peon

    Messages:
    286
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Normally if your page is put on the web, there should be the warning for the use of javascript. But there will be a warning if you open it in local drive.
     
    unigogo, Apr 22, 2009 IP