How to do form PHP processing without leaving the page?

Issues related to forms.
Post Reply
SpokaneDude
Posts: 46
Joined: Tue Oct 23, 2012 9:47 pm

How to do form PHP processing without leaving the page?

Post by SpokaneDude » Tue Jul 21, 2015 7:45 pm

I have a form with a button on it; currently the button submits the data to a separate page, which displays as a blank page. I don't want to leave the page where the form and button are being displayed.

Is there a way I can do the PHP processing on the page where the form and button are displayed?

User avatar
Pablo
Site Admin
Posts: 2636
Joined: Mon Feb 13, 2006 7:00 am
Location: Europe
Contact:

Re: How to do form PHP processing without leaving the page?

Post by Pablo » Tue Jul 21, 2015 8:26 pm

The form is processed on the same page.
Only if you set the 'success page' to another page then the user will be redirected.

SpokaneDude
Posts: 46
Joined: Tue Oct 23, 2012 9:47 pm

Re: How to do form PHP processing without leaving the page?

Post by SpokaneDude » Tue Jul 21, 2015 8:40 pm

I assume you are referring to the "action" field? So, I removed the page name from the action field and added it to the form html on the same page. I put it after the <div/> tag... not working there either... so where does the PHP code go?

User avatar
Pablo
Site Admin
Posts: 2636
Joined: Mon Feb 13, 2006 7:00 am
Location: Europe
Contact:

Re: How to do form PHP processing without leaving the page?

Post by Pablo » Tue Jul 21, 2015 9:07 pm

I assume you are using the built-in form processor?
If yes, then the processing script is on the same page and the 'success page' properties specifies the next page.
If not, then your own script determines what happens after calling the form.

SpokaneDude
Posts: 46
Joined: Tue Oct 23, 2012 9:47 pm

Re: How to do form PHP processing without leaving the page?

Post by SpokaneDude » Tue Jul 21, 2015 9:23 pm

Yes, I'm using the build-in forms processor...got it working, thank you very much! :D

SpokaneDude

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest