0

I have a form with multiple inputs and want to send this data when click on submit button to more than php page at the same time

index.html

<html>
<head>
<title>SO Example</title>
</head>
<body>
-----------------------------------------------------------------------
<form action="index1.php , index2.php2" method="POST">
-----------------------------------------------------------------------
<!--Putting inputs here -->

<button type="submit" name="submit">UPLOAD</button>
</form>
</body>
</html>

Same form data to different pages ,is there any way to do that !

ADev
  • 669
  • 3
  • 11
  • 17
  • 1
    You can only define one URL in the action. If you, for what ever reason, want to submit it to multiple pages, you can use Ajax to do it inte background instead. But this actually sounds like a [XY problem](http://xyproblem.info/). If the application and code were properly structured, I don't see when you would ever need to do this. – M. Eriksson Jul 19 '20 at 10:28
  • This is a simple thing of my problem, i am working in machine learning model and i am sending data from html page to flask page to do a prediction on this data and then return it to the page by heroku , now i need to store this data in database created in heruko that i can access and add data to it throw php file so i need to send the data to flask to do prediction on it and at the same time i want to store it in the database throw php page – ADev Jul 19 '20 at 10:36
  • Set one form handler. That handler can store the data in a database and then pass the data to any other resource (method or external page or where ever). – M. Eriksson Jul 19 '20 at 10:44

0 Answers0