SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Enthusiast
    Join Date
    Aug 2004
    Location
    Vancouver, B.C., Canada
    Posts
    86
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Populating form fields.

    Hiya,

    I have a form that I need populating with variables passed from a url, like this:

    www.abc.com/index.php?company=abc

    <input name="company" type="text" value="<?php echo $_GET['company'] ?>">

    I thought this would do the trick but it doesn't work. I'm still a php noob. Your help is much appreciated.

    Thanks

  2. #2
    Who turned the lights out !! Mandes's Avatar
    Join Date
    May 2005
    Location
    S.W. France
    Posts
    2,496
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Youve missed the semicolon off the end of the PHP echo statement, other than that it should work fine
    A Little Knowledge Is A Very Dangerous Thing.......
    That Makes Me A Lethal Weapon !!!!!!!!

    Contract PHP Programming

  3. #3
    SitePoint Enthusiast
    Join Date
    Aug 2004
    Location
    Vancouver, B.C., Canada
    Posts
    86
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    oh gggeeezzzz, thanks.

  4. #4
    Who turned the lights out !! Mandes's Avatar
    Join Date
    May 2005
    Location
    S.W. France
    Posts
    2,496
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    No problem, easily done.
    A Little Knowledge Is A Very Dangerous Thing.......
    That Makes Me A Lethal Weapon !!!!!!!!

    Contract PHP Programming


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •