prp9 Posted December 17, 2006 Share Posted December 17, 2006 How do i post the form data to different php files at once. I tried thefollowing code (two actions) but it doesn't work. the data is sent only to the firstphp file. <form method="post" action="first.php" action="second.php">Email<input type="text" name="email" value ="" size="20" /><input type="submit" value="submit" /></form>Is there a solution? if not, I also have slightest idea of this, but i dont know how to finish this. i opened first.php and added following at the end:require_once second.php;$pass_on_again = ******* ($email);what do i replace the ******* with? Link to comment https://forums.phpfreaks.com/topic/30934-posting-form-data-to-two-php-scripts-at-once/ Share on other sites More sharing options...
marcus Posted December 17, 2006 Share Posted December 17, 2006 You can include a page on first.php, so when the form processes it will also find the $_POST['email'] on second[code=php:0]<?phpinclude('second.php');?>[/code] Link to comment https://forums.phpfreaks.com/topic/30934-posting-form-data-to-two-php-scripts-at-once/#findComment-142723 Share on other sites More sharing options...
prp9 Posted December 17, 2006 Author Share Posted December 17, 2006 thank youI did not try it yet but, do i have to add it at the top or does it also work if i put it in the bottom. Link to comment https://forums.phpfreaks.com/topic/30934-posting-form-data-to-two-php-scripts-at-once/#findComment-142732 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.