Page 1 of 1

saving input of php form and restore

Posted: Mon Feb 23, 2015 8:12 am
by sanjay1236
Hello am new to php

have two forms main.php and another is submain.php
in main.php input fields are different that of submain.php
enters all fields of main.php
calls submain.php in submit button of main.php
do something in submain.php and after click to backtomain i comes back to main.php
but I founds whatever I entered earlier becomes blank
how can I solve this problem

Re: saving input of php form and restore

Posted: Mon Feb 23, 2015 8:28 am
by Celauran
First step is probably to post some code so we can see what's going on.

Re: saving input of php form and restore

Posted: Fri Feb 27, 2015 6:18 am
by Celauran
I don't see any mention of SQLite in the OP.

Re: saving input of php form and restore

Posted: Fri Feb 27, 2015 3:17 pm
by Christopher
sanjay1236 wrote:do something in submain.php and after click to backtomain i comes back to main.php
but I founds whatever I entered earlier becomes blank
how can I solve this problem
You need to maintain the values. Two common ways to do this. The first, and simplest, is to pass values in hidden fields to maintain all field values between forms. The second way is save the values in the session.

Re: saving input of php form and restore

Posted: Sat Feb 28, 2015 10:30 am
by sky2002
I think you can use historyback with javascript