Results 1 to 6 of 6

Thread: how to take input & display output in a common input text box

  1. #1
    Join Date
    May 2011
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default how to take input & display output in a common input text box

    hello everyone
    i have make a from containing 6 input text box with a submit button.
    now i want to use this form in various purpose. at one view i want to use this a input from and another view i want to display data from database. i m able to retrieve data from database. if i display data then unable to take input.

    <input type="textbox" name="uname" value="<?php echo $name;">

    this code shows error while i want to take input.

  2. #2
    Join Date
    Jul 2010
    Location
    Minnesota
    Posts
    256
    Thanks
    1
    Thanked 21 Times in 21 Posts

    Default

    You forgot to close the php tag here
    PHP Code:
    value="<?php echo $name;">
    should be this
    PHP Code:
    value="<?php echo $name;?>">

  3. #3
    Join Date
    May 2011
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    thanks for ur reply. but it was just a typing mistake. this process doesn't allow to take input from mentioned textbox.

  4. #4
    Join Date
    May 2007
    Location
    Boston,ma
    Posts
    2,127
    Thanks
    173
    Thanked 207 Times in 205 Posts

    Default

    Please post all of your code.
    Corrections to my coding/thoughts welcome.

  5. #5
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    There's another typo: your variable is $name but your textbox is "uname"
    Daniel - Freelance Web Design | <?php?> | <html>| espa˝ol | Deutsch | italiano | portuguŕs | catalÓ | un peu de franšais | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

  6. #6
    Join Date
    Apr 2008
    Location
    So.Cal
    Posts
    3,643
    Thanks
    63
    Thanked 517 Times in 503 Posts
    Blog Entries
    5

    Default

    Quote Originally Posted by dewan View Post
    this process doesn't allow to take input from mentioned textbox.
    it should. if the user doesn't clear the textbox and type something else, then when the form is submitted it will simply hold the same value you gave it. have you tried this and encountered problems?

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
  •