Hi

I am experiencing a strange issue with one of my forms on a site I am currently developing (inherited from a previous developer) and the problem is 'sometimes' when i submit the form, the POST array contains nothing, and somtimes it contains the one POSTed form element from my form and I cannot for the life of me understand why this is happening. The issue here is that when I detect this form field has been POSTed, I then execute important php code and this is not happening on some occassions..

i.e. I have the following form:

<form name="ecart_checkout_form" action="<?php echo $_SERVER["PHP_SELF"]; ?>" method="post" enctype="application/x-www-form-urlencoded">

<input type="hidden" name="PageState" value="CardDetails">
</form>

Now, I could submit the form and my POST array will be empty one time and the next time it might detect my PageState hidden field.

Has anyone come across this kind of thing before?

Can anyone offer advice?

Many Thanks for reading.

    how do you submit the form? (ie i see no visible form element there)

      Add a line to print out the REQUEST vars from your form when submitted and test that to see if you get any form values when you do not see them in the $_POST array.

      var_dump($_REQUEST);

      If you see your form vars and values, check you code to see if you are not doing something to prevent them from showing in certain instances.

        Write a Reply...