I need to add couple of php page as from action like,
<form action=“one.php”, “two.php” method=“POST”>
The code above is not working, how can i use more than one form action url?
Why do you have your form processing done in two separate files? What you have is invalid html, but you could use
action="process.php", and then in the file process.php just include the two files you want to use:
<?php include "one.php"; ?> and
<?php include "two.php"; ?> if you really must do it that way.
As webmachine states send the form to one file and then send data onwards from there once everything has been validated and cleaned. If you need the data to perform a few procedures, you can do this via includes. For example...
//do validation on POST vars if(!$validate) header('file0.php?err=1'); include 'file1.php'; include 'file2.php'; $success = file1func($var1) & file2func($var7) ; $qs = ($success) ? 'msg=1' : 'err=2'; header('file0.php?'. $qs) ; exit;
If you need both to be request from the browser, using POST, you can use AJAX.
If you just need to execute both files, include or require is your choice.