Anyone know how to insert dynamic data to a webpage?

Discussion in 'HTML & Website Design' started by giantimpact, Jan 18, 2010.

  1. #1
    Hi Everyone!

    Honestly, I am not sure this is html question or a php one :) Sorry if I post it to the wrong place.

    I would like to create a web page that has a dynamic data to insert from the url.

    For example:
    The url is : http://www.domain.com/index.html?=dynamic-data

    When the visitor click the above url, he/she will arrive to a web page showing:
    "Welcome to dynamic-data's Page" in the content.

    Does anyone can help telling how to make that?
     
    giantimpact, Jan 18, 2010 IP
  2. jonathandey

    jonathandey Active Member

    Messages:
    112
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    53
    #2
    Yes this would be PHP and you would use a GET statement.
    Using the above example, altering it slightly:
    
    http://www.domain.com/index.php?name=dynamic-data
    
    Code (markup):
    The index.php page will look like this:
    
    <?
    
    $name = $_GET['name'];
    
    echo $name;
    
    ?>
    
    Code (markup):
    Hope this helps
     
    Last edited: Jan 18, 2010
    jonathandey, Jan 18, 2010 IP