The Cache: Technology Expert's Forum
 
*
Welcome, Guest. Please login or register. September 22, 2019, 11:49:59 PM

Login with username, password and session length


Pages: [1]
  Print  
Author Topic: Problem with passing variables with $_GET  (Read 1481 times)
krustee
Rookie
**
Offline Offline

Posts: 33


View Profile
« on: November 11, 2009, 10:32:20 AM »

I have a signup script to a website that displays the capture in a browser to be solved by a human.
This page shows the captcha etc, the code will explain it better:
Code:
if(!isset($_GET['captchacode']))
{
//get the captcha and token
$arr = get_token("https://site.com/acct/register",$pid);
$token = $arr['token'];

if(!isset($_SERVER['_']))
{
echo "<img src='captcha/captcha".$pid.".jpg' width=300/><br />";
echo "<FORM action='" . $_SERVER['PHP_SELF'] . "' method='GET'>";
echo "Type in the code <input type='text' size='15' name='captchacode' />";
echo "<input type='submit' value='submit answer' />";
echo "<input type='hidden' name='hash' value='" . $token . "' />";
echo "</FORM>";

exit(1);
}

}

if(isset($_GET['captchacode']))
{
$solved_captcha = $_GET['captchacode'];
$token = $_GET['hash'];
}

Now the problem I am having is after my script finishes and goes onto the next iteration in the loop the $_GET variables are already set so it doesn't scrape the captcha again etc.

I have been racking my head Huh? trying to think of an alternate way to pass the information. Any input would be great.
« Last Edit: April 03, 2010, 06:19:44 AM by krustee » Logged
krustee
Rookie
**
Offline Offline

Posts: 33


View Profile
« Reply #1 on: November 11, 2009, 04:43:24 PM »

Nevermind, that was a total cluster poop, must have been too 
Logged
Pages: [1]
  Print  
 
Jump to:  

Perkiset's Place Home   Best of The Cache   phpMyIDE: MySQL Stored Procedures, Functions & Triggers
Politics @ Perkiset's   Pinkhat's Perspective   
cache
mart
coder
programmers
ajax
php
javascript
Powered by MySQL Powered by PHP Powered by SMF 1.1.2 | SMF © 2006-2007, Simple Machines LLC
Seo4Smf v0.2 © Webmaster's Talks


Valid XHTML 1.0! Valid CSS!