Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9232019
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T06:12:49+00:00 2026-06-18T06:12:49+00:00

I hope I’m not posting a duplicate question but I’ve looked around (and googled

  • 0

I hope I’m not posting a duplicate question but I’ve looked around (and googled as well!) and nothing has given me the answer I’m looking for.

I have a form in HTML. When the user submits the form the values get stored with mysql under their user account for the site.

The issue is, I’d like the user to be able to go back and edit the form any time they like.

I could certainly just populate the form with values from php when the users review the form, but it gets tricky when I try to populate a file input field (and the file has been saved in mysql using the blob type). Not to mention that I’d like to do this as cleanly as possible.

Ideally it would be nice if there was a convenient module for reviewing forms that have already been submitted in JQuery per se.

Can anyone offer any advice? Thanks in advance!

Edit:
Here’s a good example of what I mean – in chrome if I fill out a form and redirect to the next page after hitting submit, if I hit back I come back to the form and it’s still filled out with the information I entered previously! Could I invoke this behaviour whenever I want to, as opposed to only when the user hits back?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T06:12:50+00:00Added an answer on June 18, 2026 at 6:12 am

    Unless someone has a better way, at the moment I’m using a combination of 2 things:

    1) Utilizing the $_SESSION variable
    2) Setting the “name” attribute of every input in the form to the name of the field it corresponds to in the database.

    This way I can loop through all the values dynamically instead of hardcoding them all in. Some input types (like file) are exceptional and will be handled on their own. Other that I can do something like this:

    To insert into mysql:

    $fields = array();
    $values = array();
    foreach ($_POST as $field => $value) {
        $fields[] = $field;
        $values[] = addslashes($value);
    }
    
    $fieldString = 'Table_Name('.implode(', ', $aFields).')';
    $valueString = "VALUES('".implode("', '", $aValues)."')";
    mysql_query("INSERT INTO $fieldString $valueString");
    

    Reviewing the form is somewhat similar. I am using javascript to hook into document.onload. I need to pass javascript the records from mysql so that it may populate the form. Then it’s a simple matter of getting elements by their name and assigning them their values that were passed from php.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Hope this question is not stupid since I am an amateur web designer. I
Hope it's not against rules to post more than 1 question per page. I
hope all of you doing well. I have small question in C#.Net. actually i
Hope someone can help. Apologies for not being well informed on htaccess. I have
Hope this is not a stupid question. For Regression testing, I wrote a small
(Hope it is not a duplicate because I didn't find it when searching and
hope you can help me (tried lots of things here, but nothing worked) i
Hope there is not an answer yet (I've checked). Can I introduce a login
Hope you all are well. I want to upload my application in android market.but
Hope this is not too broad but after a lot of googling I am

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.