Jump to content

How to make entries remain on the form after clicking submit button ?


tmyonline

Recommended Posts

Hi guys:

 

My page has two parts; part I on top is where users enter data.  After they enter data and click "save", those data will be displayed in part II (in the bottom of the same page).  Is there a way that I can make the input data remain on the form after users click the save/add-row/remove-row button ?  This is needed in case users need to make changes to their entries; if they are all gone upon the clicking of a button, the users will have to re-type everything from scratch and they can get mad at me for this!  I was trying to use session variables to store the values but I wasn't sure how to do this for input values.  Here's a sample of my code:

 

for ($j = 1; $j <= 6; $j++) {

  echo '<td>';

    echo "<input type=\"text\" name=\"text_" . "1" . "$j\" /><br />";

    echo "<input type=\"int\" name=\"image_" . "1" . "$j\" /><br />";

    echo "<input type=\"int\" name=\"material_" . "1" . "$j\" /><br />";

  echo '</td>';

}

 

Any idea or alternatives ?  Thanks a lot.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.