artnow;10989769 wrote:Not sure if you're teasing me
Not at all. It's just that if the same script handles both displaying the form and handling form submit, the output statement wouldn't show until the submit was clicked.
But you should probably add some code to handle improved security. If all you check is that $_GET['UID'] is set, then anyone could make such a request and have the code execute.
One improvement would be to add an additional post token, unique for each request, which is also sent to the third party server on form submit. When they send their request to your server, you would check that this token and the UID match. And at the very least, you should check that the request originates from whatever IP the remote server has.
But the best approach would probably be to handle form submits on your own server, use cUrl to send the request to the remote server and have them send a response to your server rather than a separate request.