unemployment Posted July 26, 2011 Share Posted July 26, 2011 With this url http://mysite.com/c/hims?fan=1 my get doesn't get executed... if (isset($_GET['fan'])) { company_add_fan($info['companyid']); } My form is... <li class="bass"> <form action="../c/<?php echo $info['companytag']; ?>" method="get"> <button class="submitlink" title="Become a Fan"> <span class="f_right">Become a Fan</span> <img src="/assets/img/becomeassoc.jpg" class="mrs f_right vmiddle" alt="Become a Fan" /> </button> <input type="hidden" name="fan" value="1" /> </form> </li> Quote Link to comment https://forums.phpfreaks.com/topic/242816-get-fails/ Share on other sites More sharing options...
btherl Posted July 26, 2011 Share Posted July 26, 2011 There are 4 things I would check there: 1. How is the form submitted, and does it really send fan=1? 2. Is the "if" actually executed, or is it skipped because of other code outside? 3. Is company_add_fan() being executed but not having the expected result? 4. Is your web server dropping the query string when it redirects that url to your script? Quote Link to comment https://forums.phpfreaks.com/topic/242816-get-fails/#findComment-1247140 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.