Hello,
I am working on a script where reCAPTCHA or a similar form of CAPTCHA will be used, for the sake of this example I will talk about reCAPTCHA. I wanted to know how I could have the reCAPTCHA script store a value upon correctly entering a code that will be used by a different script to allow on to proceed?
A snippet of the reCAPTCHA code which will be located in a file called recaptcha.php.
Code: (text) if ($resp->is_valid) {
[b] $captcha = "1";
# in a real application, you should send an email, create an account, etc[/b]
} else {
# set the error code so that we can display it. You could also use
# die ("reCAPTCHA failed"), but using the error message is
# more user friendly
$error = $resp->error;
}
}
I bolded the part of interest, how would I be able to use a variable like
Code: (text) $captcha = "1";
In a completely different file that is called login.php to allow one to login if the captcha is correct? The value would only be needed for that session of course. I want to use this method because the captcha script might be used in multiple locations so I figure this route would be easier and allow for quicker modifications than have the script called each time in different files for instance.
The only alternative I can think of is using MySQL or local files to store the answer but that won't be very logical for a script that could have hundreds of requests an hour.
Any help would be appreciated, thanks in advance
Can I call a class inside a function?
I have a class written in another file that handles my image resizing.Can I do this (php says I can't calling a non-existent class), but I know its there becuase the require doesn't fail aboveCode:
Problem with Subscreen
Dear Experts ,
send message to the java application
Oracle 10g with Windows platform.
Probably Easy, Need help with Check Boxes in PHP Code
hello,Thanks for looking this over and helping me out. My problem is I have a online store locator database and whats happening is I keep getting an "array" message when I look at the store.
Captcha problem users just refresh and it will let them auto submit again
Users will just re submit and not have to enter the new captcha.. ? Lol but if i refresh the page, the captcha auto makes a new1 so u cant submit.But if u enter captcha code alrdy, then submit form
search function
HI guys,if anyone could point us in the right direction of how to do this, or provide some test code for a similar problem would be great!Basically, I have user profiles on my site, and I have a
Deleting a record php
Attempting to setup delete a record page. The below code I put together doesn't seem to work. | <?$delid=$_GET['delid'];echo $delid;if(isset($_POST['submit'])){$delquery="DELETE FROM table
Memory Allocation
Hi folks,see this ex:int v=5;v=v+10;then what will do the compiler before the output come as 15.Please explain me technically.
Add code to enable passing of checkbox variable on login
Ok, I have a login page, but want to add a checkbox that when checked and successful login is made it passes the checkbox value (checked = "Yes" to the next page) which then loads password
Pls help with PHP
Pls can anyone direct me on how to create a user account for a customer. For example i want know if i need to use the "create databse" and create "user identified by ''" for each