cmike Posted June 15, 2010 Share Posted June 15, 2010 Hi I am having a terrible time trying to sort this out. Hope somebody can help me. My problem is, POST data being empty from a form submission. I tried many things I found on the web. My error trapping code clearly points out that the POST date is empty. So I tried the function file_get_contents('php:input') which again I got from the web. I thought this will dump the raw data for me(that is how I have coded the script) even if the POST data is empty. However it is not doing it. If the POST data is empty the output of this function is also empty. The worst thing is-during my testing I never come across such an error. Only when the clients are using it, this error happens. Most of the time the submissions are fine and the data comes through. And whenever this error happens I get notifications through the error trapping code. For instance today I lost 15 records from a client;when I checked the database I have got submissions from the same user which have come through without any problem. That is what is troubling me-if the script works most of the time, why does it fail sometimes. Please, can somebody give me some suggestions Many thanks Carol Link to comment https://forums.phpfreaks.com/topic/204848-post-data-empty/ Share on other sites More sharing options...
vbnullchar Posted June 15, 2010 Share Posted June 15, 2010 can you post the form here? Link to comment https://forums.phpfreaks.com/topic/204848-post-data-empty/#findComment-1072351 Share on other sites More sharing options...
kenrbnsn Posted June 15, 2010 Share Posted June 15, 2010 You need to show us code (both the form & the processing script) if we are to help you. The way to dump the $_POST array is to put <?php echo '<pre>' . print_r($_POST,true) . '</pre>'; ?> at the start of the processing script. If you're using sessions, put it after the "session_start()". Ken Link to comment https://forums.phpfreaks.com/topic/204848-post-data-empty/#findComment-1072354 Share on other sites More sharing options...
cmike Posted June 15, 2010 Author Share Posted June 15, 2010 Thanks for the replies. Sorry about this. Because of the nature of the project I am not allowed to show the form. It is created using Quask which is a form generating software. Once the user clicks the submit button on the form, a php script processes the data. Please find attached my php script. [attachment deleted by admin] Link to comment https://forums.phpfreaks.com/topic/204848-post-data-empty/#findComment-1072489 Share on other sites More sharing options...
kenrbnsn Posted June 15, 2010 Share Posted June 15, 2010 Since this is using a 3rd Party form generator, I highly doubt that anyone here can help you. You're best bet is to use the support options the product offers. Ken Link to comment https://forums.phpfreaks.com/topic/204848-post-data-empty/#findComment-1072493 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.