shades Posted July 17, 2017 Share Posted July 17, 2017 Hi Guys, I have a PHP Page which has forms which are added dynamically by the user. The data is stored in db accordingly. I want to know is there a way to get the page structure back with all the fields ? so user can see and update if necessary...I am able to get all the inserted data by querying my db.... but I am stuck with getting back the actual page with the exact structure (meaning along with all the dynamically added forms) and populate data in respective input boxes :/ Any help or a workaround will be greatly appreciated. Thanks Quote Link to comment Share on other sites More sharing options...
requinix Posted July 17, 2017 Share Posted July 17, 2017 You can't magically know what happens on the client without the client telling you, so the data sent by the form has to mirror and/or include the structural information. What's an example of the form and data? Quote Link to comment Share on other sites More sharing options...
ginerjm Posted July 17, 2017 Share Posted July 17, 2017 Supply your html elements with value="$phpvar" attributes. Then when your script reads in the post array, save the input values into those phpvars. When you re-display this html form the values will be there. Be sure to re-init them when you don't want the values sent back. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.