
July 18th, 2011, 12:09 PM
|
|
Registered User
|
|
Join Date: Jul 2011
Posts: 3
Time spent in forums: 23 m 56 sec
Reputation Power: 0
|
|
|
Convert PHP to ASP please :)
Hello, and thank you for taking the time to assist me. I am currently looking for a nice simple jquery captcha that is either point and click, or drag and drop. I keep running into PHP though.
So im hoping someone is kind enough to help me convert this to VB.
PHP Code:
if($_SERVER['REQUEST_METHOD'] == "POST" && isset($_POST['captcha']) && $_POST['captcha'] == $_SESSION['captcha'])
{
echo "Passed!"; /* YOUR CODE GOES HERE */
unset($_SESSION['captcha']); /* this line makes session free, we recommend you to keep it */
}
elseif($_SERVER['REQUEST_METHOD'] == "POST" && !isset($_POST['captcha']))
{
echo "Failed!";
}
/* in case that form isn't submitted this file will create a random number and save it in session */
else
{
$rand = rand(0,4);
$_SESSION['captcha'] = $rand;
echo $rand;
}
Thank you again for your time 
|