rustycode Posted August 20, 2010 Share Posted August 20, 2010 HI All - Hoping you can help me out here with an issue that's preventing me from posting a form. I am still stumbling my way through this. I have a form that submits to itself with php code that uses a $curlhandle to post to a remote server, return xml data and parse it. The submission to the remote server works perfectly and the data returned is fine. The problem I am having is that when the form page initially loads in the browser, it thinks the form is already trying to submit, and it returns an error message for the first blank field. The error message is from the remote site. There is no database involved with this and the information does not need to be saved, just displayed on the same page the form resides on. So, is there a way I can load the page with the form without getting the error message from the remote site? Quote Link to comment https://forums.phpfreaks.com/topic/211237-form-submission-problem/ Share on other sites More sharing options...
matto Posted August 20, 2010 Share Posted August 20, 2010 Only have the code execute when the submit button on the form is pressed. eg: if(isset($_POST['submit')) { //start executing code.... } Quote Link to comment https://forums.phpfreaks.com/topic/211237-form-submission-problem/#findComment-1101516 Share on other sites More sharing options...
rustycode Posted August 20, 2010 Author Share Posted August 20, 2010 Thanks....couldn't get the page to load using isset. I used a third page to process the form. Thanks for your time though. Quote Link to comment https://forums.phpfreaks.com/topic/211237-form-submission-problem/#findComment-1101817 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.