Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5

Thread: php form help!

  1. #1
    New Coder
    Join Date
    Apr 2006
    Posts
    53
    Thanks
    0
    Thanked 0 Times in 0 Posts

    php form help!

    hi
    Ive implemented edit details function but how it works is that when i view the records, there is a link to edit that particular record.
    Now that all works fine but when it shows the edit details form, it is empty, is there a way that i can get it to display the information that the record already has and then they can just edit it accordingly rather than having to input all the information again, even the stuff that is already correct?
    thanks

  • #2
    raf
    raf is offline
    Master Coder
    Join Date
    Jul 2002
    Posts
    6,589
    Thanks
    0
    Thanked 0 Times in 0 Posts
    could you post the code that you use to build and populate the edit-form?
    Posting guidelines I use to see if I will spend time to answer your question : http://www.catb.org/~esr/faqs/smart-questions.html

  • #3
    New Coder
    Join Date
    Apr 2006
    Posts
    53
    Thanks
    0
    Thanked 0 Times in 0 Posts
    yeh of course
    the form part looks like:

    echo '<h2> Edit Customer </h2>
    <form action = "edit_cust_details.php" method = "post">
    <p>User Name: <input type="text" name ="user_name" size="15" maxlength="15" value"' .$row[0] . '"/></p>
    <p>First Name: <input type="text" name ="first_name" size="15" maxlength="15" value"' .$row[1] . '"/></p>
    <p>Last Name: <input type="text" name ="last_name" size="15" maxlength="15" value"' .$row[2] . '"/></p>
    <p>Email: <input type="text" name ="email" size="15" maxlength="15" value"' .$row[3] . '"/></p>
    <p><input type="submit" name="submit" value="Submit" /></p>
    <input type="hidden" name="submitted" value="TRUE" />
    <input type="hidden" name="user_name" value="' . $id . '" />
    </form>';

    thanks

  • #4
    raf
    raf is offline
    Master Coder
    Join Date
    Jul 2002
    Posts
    6,589
    Thanks
    0
    Thanked 0 Times in 0 Posts
    and could we also see the code you use to select the data from the db?
    Posting guidelines I use to see if I will spend time to answer your question : http://www.catb.org/~esr/faqs/smart-questions.html

  • #5
    New Coder
    Join Date
    Apr 2006
    Posts
    53
    Thanks
    0
    Thanked 0 Times in 0 Posts
    hey
    its ok i've solved the problem now
    all i needed to do was put an = after the word value!
    thanks neway

    puja


  •  

    Posting Permissions

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