保持html / php表单超时

I have a rather long html / php form that I have users fill out and if it takes longer than my server allows max connection time, then it times out and they lose what they have filled out when the form does not submit correctly. The users log in through and a session cookie is created for credentials that go along with the mysql INSERT statement.

My question is would setting up an autosave keep that connection alive if it is communicating with the database on an autosave every half hour or so? Or is there a better way to do this? Mind you, it's not the save that takes too long and times out, it seems to be the inactivity with the database that causes the dropped connection.

Thanks for the help everyone!

You can make a page which will keep connection live and send a hidden call through ajax after a periodic interval to keep session and other things alive while user is not interacting with the page.