Jump to content

Complex PHP forms


EagerWolf

Recommended Posts

I have created my own form generator. Forms are being called from array.

 

The problem is that a lot of attributes must be inputed and I've decided to make multi step forms. Everything is ok by now. The problem is when I try to store data from first step in array.

 

I have created another file, which goes trough all inputed data and store theme in session and than redirect you to next step. It worked, but I had problems with 'Back' button of course.

 

I was thinking what to do. Should I do something like this:

 

a href='nextForm', onClick='javascript: submitform()'>Naprej</a>

 

nextform is created by php and generates url for next step. I have Java script:

<SCRIPT language="JavaScript">

function submitform()

{

  document.formgen.submit();

}

</SCRIPT>

 

and it works as well. Form action is pointed to file, I've created to store input.

 

Should this command go to next page and store data as well? Do you prefer any other solution?

 

Thanks for help!

 

Best regards,

M

Link to comment
https://forums.phpfreaks.com/topic/38299-complex-php-forms/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.