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
saving input of php form and restore
Moderator: General Moderators
-
sanjay1236
- Forum Newbie
- Posts: 1
- Joined: Mon Feb 23, 2015 8:05 am
Re: saving input of php form and restore
First step is probably to post some code so we can see what's going on.
Re: saving input of php form and restore
I don't see any mention of SQLite in the OP.
- Christopher
- Site Administrator
- Posts: 13596
- Joined: Wed Aug 25, 2004 7:54 pm
- Location: New York, NY, US
Re: saving input of php form and restore
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.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
(#10850)
Re: saving input of php form and restore
I think you can use historyback with javascript