Jump to content

Submit form without page refresh.


fishbaitfood

Recommended Posts

Hey all,

 

I have this form I'd like to submit without a page refresh.

Someone said it was as simple as using the Ajax .request() function.. Seems unlikely to me?

 

So basically, I have this form with data, which will be inserted into a database after submit, and instantly goes back to the form page using header('Location: index.php').

 

Besides the refresh, this works perfectly.

 

Is it possible, to post my form without a refresh, but still submitting data to the process page where the data is inserted into tables and brings me back with header?

 

So Ajax or jQuery doesn't need to fetch the output from the process page, but just post it. Sure this is possible, right?

 

I've tried to find examples on my situation, but I haven't found one.

 

Thank you.

Link to comment
https://forums.phpfreaks.com/topic/246862-submit-form-without-page-refresh/
Share on other sites

Thanks for your reply!

 

But in all scripts I've seen so far, to send a form with ajax, it needs an "output" back, right?

In my case, I just want to send the form, only send. My process page has a header('Location: index.php'), to get back. But I guess that won't work, right?

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.