SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Member
    Join Date
    Jun 2007
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    HTML_QUickForm Display Submitted

    Hello everybody.

    I have a form to update some info at my DB with HTML_QUickform.

    My idea is that, once submitted updated info, redisplay the form with the updated info, to allow further changes, if needed.

    When using method display it shows "old" data, not the submitted one.

    Is there any easy way to do that?

    Thanks.

  2. #2
    SitePoint Addict
    Join Date
    Sep 2005
    Posts
    335
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    <input type="text" name="field1" value="<? echo $_POST["field1"]; ?>">

    The first time through the form, the $_POST["field1"] variable will be empty but once they post the form the form will display the posted field.

    If you are first reading from a database to get the initial value, then you are problably reading from the database prior to actually updating the database. In this case, update your database first before you perform your "SELECT" on the database to read the values.

    Good luck with your project.
    PHP Shopping Cart Software Easy Ecommerce Shopping Cart Script.
    PHP Super Cart is 100% template driven.

  3. #3
    SitePoint Member
    Join Date
    Jun 2007
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by jondolar View Post
    <input type="text" name="field1" value="<? echo $_POST["field1"]; ?>">

    The first time through the form, the $_POST["field1"] variable will be empty but once they post the form the form will display the posted field.

    If you are first reading from a database to get the initial value, then you are problably reading from the database prior to actually updating the database. In this case, update your database first before you perform your "SELECT" on the database to read the values.

    Good luck with your project.
    Sorry, This is not what I am looking form.

    I am talking about PEAR class HTML_Quickfrom.


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
  •