![]() |
Simple form, variables appear empty in script - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21) +--- Thread: Simple form, variables appear empty in script (/showthread.php?tid=24868) |
Simple form, variables appear empty in script - El Forum - 11-22-2009 [eluser]mcair[/eluser] Code: <form method="post" action="auth/Login"> I am logging the variables captured in this form, using the following code: Code: f_logarray('auth/login',$_POST); Code: function f_getarraystring($array) The form variables are logged with values sometimes, othertimes not. If I refresh the page and re-enter values in the form and submit it, the values do not always appear using the functions I have presentelisted. This stuff should be a piece of cake, yet I'm tearing my hair out trying to make sense of why the form variable values do not always get passed into the script. Using PHP Designer on Vista with WAMP, any tips on getting the XDebug to work would be much appreciated. Simple form, variables appear empty in script - El Forum - 11-23-2009 [eluser]Flemming[/eluser] Did you solve this yet? If not, why not simply print_r($_POST) in your controller after submitting the form - see what's been posted. It might be a good place to start your debugging? Simple form, variables appear empty in script - El Forum - 11-23-2009 [eluser]mcair[/eluser] [quote author="Flemming" date="1259008163"]Did you solve this yet? If not, why not simply print_r($_POST) in your controller after submitting the form - see what's been posted. It might be a good place to start your debugging?[/quote] I did that, and it reinforced what I have seen using my methods: sometimes the form variables are populated as expected, other times they are not. I think it's due to IE caching the page. I added META tags to prevent page caching and now the values are consistently populated. Not sure what page-cahcing has to do with submission of form variables and/or whether this is a shortcoming of IE. |