php url

Discussion in 'PHP' started by miriko, Jul 5, 2011.

  1. #1
    Hi, need help.

    "t4" is from the undersides of the domain. I want to call sub-pages found via a link.

    When I click on link output, then it leads to Home _http: / / domain.com /, but should lead to bottom. Sun: _http: / / domain.com / bottom <- (t4-output)

    PHP Code:
      echo "<div> href='http://domain.com/'>". $ st ['t4']. "</ a> </ div>";
    PHP:
    Why "t4" is not added in link?
     
    miriko, Jul 5, 2011 IP
  2. sarahk

    sarahk iTamer Staff

    Messages:
    28,899
    Likes Received:
    4,555
    Best Answers:
    123
    Trophy Points:
    665
    #2
    You don't have the t4 inside the href. Try

    echo "<div> href='http://domain.com/{$st['t4']}'>{$st['t4']}</ a> </ div>";
    PHP:
     
    sarahk, Jul 5, 2011 IP
  3. Kyosys

    Kyosys Peon

    Messages:
    226
    Likes Received:
    10
    Best Answers:
    0
    Trophy Points:
    0
    #3
    you are also missing an "<a " in front of your href
     
    Kyosys, Jul 6, 2011 IP