soccerrprp1 Posted November 20, 2010 Share Posted November 20, 2010 Hi all, I was wondering if it was possible and not too messy to have a single form page (html) and have it post to 2 or more PHP files? Surely this is something that is desirable and accomplished at some point, right? Thanks. Richard Link to comment https://forums.phpfreaks.com/topic/219316-submit-to-multiple-php-files-possible/ Share on other sites More sharing options...
PaulRyan Posted November 20, 2010 Share Posted November 20, 2010 Yeah that would be possible. Looking into AJAX would be handy if you ask me. Not sure how it could be done with PHP, possibly using cURL? Regards, Paul. Link to comment https://forums.phpfreaks.com/topic/219316-submit-to-multiple-php-files-possible/#findComment-1137256 Share on other sites More sharing options...
shlumph Posted November 21, 2010 Share Posted November 21, 2010 Not in a single request, no. You would be able to take a request and then create multiple requests, though. How come you want to do something like this? Link to comment https://forums.phpfreaks.com/topic/219316-submit-to-multiple-php-files-possible/#findComment-1137348 Share on other sites More sharing options...
soccerrprp1 Posted November 21, 2010 Author Share Posted November 21, 2010 hi shlumph, well, i want to create multiple versions of the same php file. so, want to be able to post input to all of these and the various versions are being used by others in different ways. kind of having 3 or 4 different styles of the same php file. how would i go about doing this? thanks. Link to comment https://forums.phpfreaks.com/topic/219316-submit-to-multiple-php-files-possible/#findComment-1137365 Share on other sites More sharing options...
shlumph Posted November 21, 2010 Share Posted November 21, 2010 Like PaulRyan mentioned, you could use AJAX which would probably be the easier route if you're familiar with it. Otherwise, you'd have to use cURL: if(isset($_POST)) { //cURL request to V1 //cURL request to V2 //cURL request to V3 } Link to comment https://forums.phpfreaks.com/topic/219316-submit-to-multiple-php-files-possible/#findComment-1137503 Share on other sites More sharing options...
soccerrprp1 Posted November 22, 2010 Author Share Posted November 22, 2010 Thanks guys. Found an incredible ajax/jquery solution. Check this out! http://stackoverflow.com/questions/1585307/how-to-form-post-to-multiple-locations I LOVE IT WHEN PEOPLE ARE WILLING TO SHARE THEIR TALENTS AND KNOWLEDGE! MAKES THIS WHOLE TECH STUFF FUN AND FAR LESS FRUSTRATING! Thank you! Wouldn't have gone the ajax route if not mentioned. Still learning this stuff... Link to comment https://forums.phpfreaks.com/topic/219316-submit-to-multiple-php-files-possible/#findComment-1137950 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.