HTML & PHP

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Shaun Rigby

    HTML & PHP

    how do i define a php variable using html?
    i want to set an shtml page as a page with links to products - when each
    button is pressed it it sets the product_categor y variable and lists all
    entries with this variable - how do i set the html link to set the
    variable?? wat do i need to set the product_categor y to?


  • Paul Barfoot

    #2
    Re: HTML & PHP

    Hi Shaun

    Use a link similar to <a href="script_fi le.php?product_ category =x">Click
    here</a>

    In script_file.php you can get at this variable using either
    $product_catego ry or $_GET['product_catego ry'] .

    What you set product_categor y (the value of x in the link above) to is up to
    you and your script! Does it need to be set to a valid value that is then
    used to look up data in a database?

    HTH
    --
    Paul Barfoot


    "Shaun Rigby" <shaunrigby16@h otmail.com> wrote in message
    news:zHbEd.8629 7$Z7.65918@fe2. news.blueyonder .co.uk...[color=blue]
    > how do i define a php variable using html?
    > i want to set an shtml page as a page with links to products - when each
    > button is pressed it it sets the product_categor y variable and lists all
    > entries with this variable - how do i set the html link to set the
    > variable?? wat do i need to set the product_categor y to?
    >[/color]


    Comment

    Working...