anyone here knows how to make a save and continue? I have a multi page form and it have many different parts so I need a save and continue form so they can fill out this form on the other day.
So firstly a user will log in into his/her account and they will see this link,
see image here
Once they will click on it, they will see a multi page form like this,
form image
When the user has filled out these data,
Sample data,
sample data 1
sample data 2
So when the user click save, the data that the user have input will be save so when they will log in back into his/her account the data that has been saved will be displayed in the form.
Saved data,
saved data 1
saved data 2
I have not yet tried any code because I'm new to php and mysql so please help! Thank you so much.
Each time a user selects Next, add the data provided by the user to the relevant row in a database table. In this row, have a status column with status 'Draft' until the user completes the form upon which you change the status to 'Completed'.
Each time a user opens the form, load any data already entered in the past by this user.
You might consider using a column to store information about the latest page of the form used by the user, so the user can resume at that particular page of the form later.
We are not here to provide you with all the code. If you have a problem or question related to a part of the code, feel free to ask though.
Good luck!
When the user clicks on the Next Button, Save the Data into your Mysql DB in a Save Block.
In the Save block user "INSERT" Query to Insert Data to DB.
After that use PHP "header" function to redirect to the same page.
Related
I have a problem to make a web application where I could input a data of a customer, where user level-1 could input data and then user level-2 could check the data, and then user level-3 could approve the data and save it to database. So in every page I want to keep login with different username and password. So every level user would have their own username and password. And how can I make the application where the data that has been inputted by user level-1 in computer-1 to go to user level-2 in computer-2 for checking without saving the data to database and to user level-3 for approval in computer-3 where they would save the data ?
I'm using php and mysql. Could someone maybe give me a help? please.
you could have a second database for unapproved/unchecked data but that would not be the ideal way to do it, you would be better to do as u_mulder suggested and save to the database and have a separate column in the database table to show the status of the data
I'm building a simple multi-screen form using codeigniter but I'm having some trouble working out how to keep the data and perform some tasks on each stage.
A bit of background on what it's supposed to do:
User lands on the home page with a form and fills out one field vehicle reg number.
They are then directed to another page that has pulled in their data relating to their vehicle reg number via a curl/xml request. As this web service costs per request, I only want to do this once per ip address, per day. Also, when a user refreshes the page it should not perform that call again, rather the data just be there already.
After the user is on this page, they confirm their details are correct, press next and enter their contact details.
Then they press submit and receive a confirmation message and one record is inserted into the database.
My idea for this was to record the users ip address. check the database to see if a request today had been submitted with that ip. If not, let it contiue, if so just give them a manual form to complete.
My question is how do I approach this so that when a user goes onto the next stage they have the previous data. Do I make each section a separate form that passes the previous data using hidden fields? This seems a logical way to me as I only need the data if it is a complete request. If they drop off, their data is useless to me anyway.
If i use this approach, how can I prevent the refreshing form and it trying to call via curl again?
Thanks in advance for any help.
I am doing this using php,mysql
I have travel group, city, hotel, activity, start date, end date as fields to get information from the user. travel group data goes to one table in mysql database and the rest of the information go to another table..
I want all the data to be filled before clicking on the save button. But while filling only the travel group field and hitting save, the form get submitted, no time to enter other fields as travel group data goes to one separate table. As it is filled it goes to that table. Therefore I want to check whether other details are also filled when hitting on the save button, though the travel group field is filled
Hope My question is clear..Please help me out..I am struggling to do this from yesterday..I am ok with sending data to two tables using one form..But the above mentioned problem still exists..Please help me
from what i understand you are trying to validate the form.
you can try isset() function in order to check that all the required data is filled in, or you can also try and see that it is of reasonable length using strlen()
is this what you were asking for?
POST the form information (parameters) to another php file which will validate each group separately and will preform two inserts respectively. Then you can redirect the user to any page you want (including the possibility to go back to the form page).
A simple form to take user details but I want that if a user is already registered and if he enters his NAME then that script should search it in database and show his details in the form fields before submitting the form.
If I'm understanding you correctly you want a form where the user starts typing in his username and it will display the rest of his information automatically if his username exists in the database? Well in order to retrieve information from a database on the fly while a user is typing in the information (without refreshing the page) you will have to use Ajax.
But logically why would you want a form to search a database just based on a name and display the rest of that username's information before they have logged in or submitted the form? I think you should retrieve a user's details ONLY after you have verified who they are. Not just by them typing in a name. Maybe I am misunderstanding your question though.
I've made a very simple form which one user input field and a submit button. My question is how do I get what the user has entered into the field onto the actual web page? For example if the user enters their name into the text field and hits enter, how would I get that text to show up on the web page and stay there so when the next person visits the name will show up and the next person can do the same?
To store user input for use later, you should look in to implementing a database. For some examples to get you started, check out the php documentation for mysql. The doc page for mysql_query has some basic examples to get you started:
http://www.php.net/manual/en/function.mysql-query.php