Sending form for two php files

Asked

Viewed 450 times

0

I have a curious and perhaps idiotic doubt, but come on.

It is possible to send data from a form to two different php files?

  • Be a little more specific you want the data typed from a form to fill in 2 different databases??

  • Yes will feed different banks at the same time with a single form.

  • If you want to talk about two actions of the form, I don’t think it’s possible

  • ok I will search there must be some possible resolution thanks to everyone if I find a solution I will write here.

2 answers

1


Using PHP: You can send via post or get to a file (controller), which will handle and distribute the data to the 2 distinct files (models).

Using JAVASCRIPT: You can take the fields you want and send (via post or get) to different files via AJAX.

I hope I’ve helped.

1

As Alan said, this is possible via AJAX.

Even not knowing your needs, I can say that the most "cheap" will always be to do the whole processing in a single script PHP on the server side.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.