It took me 8 hours to finally give up and ask assistance from my brother for a problem that I have been struggling to figure out. This story of one of the reasons why using framework isn’t always good
I was recreating a facebook app made from cakephp to a bare php coded version. It is a very simple form that saves the data and then proceeds to step 2 and 3. Nothing complex. When it was time to test it in facebook, the form isn’t submitting! The $_POST variable is always blank. Ofcourse, the first intuition is to check why facebook isn’t saving the data to the global variable. I tried to rewrite the app and use both FBML and IFrame! At the end of my day last Friday, I just gave up and took a nap. Today, I revisited again and tried a new approach – ajax call. When I had to test it locally, the $_POST was still empty no matter what I do. I uploaded it to the dev server and still got the same results. I couldn’t find anything unusual in my code – it is just a simple form. Right at that moment I decided that I already have to bug someone to review my code (I try not to as much as I can). Just a few minutes after, I was told that my form action url must end atleast with a slash (/). Just that, a slash! OMG! (then make batok sa sarili – lol) Since I already got used to cakephp and the HTML and FORM helpers, this hasn’t become a problem.
Moral of the story? Ask earlier, I guess? Hehe. The other one is, not to rely too much on a framework! (but probably I still will)