Jump to content

Get Fails


unemployment

Recommended Posts

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>

Link to comment
https://forums.phpfreaks.com/topic/242816-get-fails/
Share on other sites

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?

Link to comment
https://forums.phpfreaks.com/topic/242816-get-fails/#findComment-1247140
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.