Please pardon my lack of 100% specific technical language… I'm a bit of a hack...
A backend developer (who's working on a server I don't have access to) has set up a form action for me, and I'm wondering what's the best way to use that form action's response as error or success messages for the user. For example, when I hit the form action with a GET variable (such as remote-server.com/action.cfm?email=nothing) the remote cfm page will display only "-3", which is the error code for "bad email". There are a series of error/success codes the developer has set up corresponding with other error/success cases.
So I'm looking for a solution that basically does:
Takes the form data and passes it to remote-server.com/action.cfm without directing the user to that page.
Reads the response from remote-server.com/action.cfm, which will be a comma-delineated series of numbers.
Assign those numbers as a string in PHP, so I can sniff out the error/success codes and display the appropriate messages in my front-end code.
So again, the problem in a nutshell is that I want to use form action="remote-server.cfm"... but WITHOUT the page redirecting the user to that cfm page. And instead, it should get the cfm page's output into my form's PHP page so I can process it. Does this make sense? I'm looking around and people seem to say AJAX is the only way to do this. Any other thoughts? Thanks so much!