So I'm trying to build a basic voting application. My approach is to have a link that opens up a colorbox with a recaptcha in it. The user fills out the captcha and submits. On the next page (also intended to load into seemingly the same colorbox) I check the captcha and do an insert into my vote tracking table. I then use the callback functions of colorbox to increment the vote on the main page.
when I click the link to have colorbox load the php page that displays the captcha, it starts to draw the color box but when it gets to displaying the captcha, it bails out of colorbox as well as the main page and i get a new blank page that is trying to load google.com.
The php code that the box almost calls.
include_once('/var/www/mydomain.com/inc/master.php');
require_once('../../inc/recaptchalib.php');
$publickey = "hidden-key";
$html=<<<html
<p>Sorry about the captcha below but in order to be fair and in effort to
prevent abuse, please prove you're human.</p>
<form name="upvote" id="upvote" action="upvoted.php" method="POST" >
<input type="hidden" name="story-id" id="story-id" value="{$_GET['storyid']}">
html;
$final = $html.recaptcha_get_html($publickey).'<input type="submit" value="Vote" /></form>';
echo $final;
The only code i'm using to call the upvote.php is: $("#ajax-test").colorbox(); I'm pretty sure that was the way the example did it to call ajax. Any help would be awesome.