CodeIgniter Forums
Script not working on first use - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: Script not working on first use (/showthread.php?tid=56407)



Script not working on first use - El Forum - 12-17-2012

[eluser]Unknown[/eluser]
I am a newbie to CodeIgniter and I have a script that is called by an iPad app. The script verifies a user and logs them into the program. When the script is called for the first time, it does not work. It DOES work the second time it is called. I have enclosed the login function here (login.txt) and my config file (config.txt). I have tried setting $config['enable_query_strings'] to TRUE, but that didn't help. You can watch the script in action (and inaction!) here:http://hackst.com/#BjOpv

The first time you go there, the response merely displays the posted variable values. When you click "Execute Again" (near the top right of the screen), it returns the proper arrays.

Any ideas would be greatly appreciated.




Script not working on first use - El Forum - 12-17-2012

[eluser]Unknown[/eluser]
An interesting note: If the parameters are posted in a different manner (as query parameters rather than a query string; see http://hackst.com/#3p0Er), it works every time! I am not writing the iPad app, though. Anyone with iPad app experience know if the data can be posted as it is at this URL (Click the "edit" link near the upper-right of screen to see how it is done.)