Hello

Having an issue getting a piece of code to work, I just don't understand it as well as I thought.

Goal: All capitals Captcha to accept lower case. ( people just dont get that its case sensitive)

Im supposed to find this :
if ($SESSION['spam_code'] != $POST['spam_code']) {

Replace this part:
$_POST['spam_code']

With this code:
strtoupper($_POST['spam_code'])

The issue is that the code really looks like this on one of the several pages I needed to change:

if ($POST['spam_code'] != $SESSION['spam_code'] || !isset($SESSION['spam_code']) || $SESSION['spam_code'] == NULL ) {

Now before you go accusing me of trying to spam someone or worring that your helping me do something wrong, my software is osDate and here is the page Im getting these instructions from:

MOD EDIT: External link removed

I had some guy earlier in chat trying to convince everyone i was the reason their mailboxes were full of spam , because of people like me, etc... I was pretty offended, especially since i havent been able to figure out what to do with this variable.
I have put it every way I know how with () behind it, before the if, after the if, in ( ) , and ( (, im just not good enough at it to figure it out yet.

Thanks for your help, alex

    Well I gess I can't include any links of any kind so im posting this for the third time.
    Luckily I copied it in notepad this time and didnt have to retype it a third time.

    Hello,

    Im having an issue with my captcha, i want it to take lowercase letters and it wants uppercase.

    Found a post that shows what I needed to replace but it's not the way it describes.

    Here is the code I was supposed to find and replace in 5 files:

                          if ($_SESSION['spam_code'] != $_POST['spam_code']) {

    I was supposed to replace :

                                                                            $_POST['spam_code']

    With this :

                                                          strtoupper($_POST['spam_code'])

    It was all right except 1 file, where the code was different:

        if ($_POST['spam_code'] != $_SESSION['spam_code'] || !isset($_SESSION['spam_code']) || $_SESSION['spam_code'] == NULL ) {

    I have tried to put it in in different spots, but i just don't know php well enough yet to get the variables right.

    Here is the original post for the instructions:
    it's in a place that kind of like forum ***** dot you know what / showthread php35705

    Im making a osDate website called freshstartsingles dot you know what
    Thanks for any and all help,

    Respectfully,
    Alex Stewart

      Something like this ought to do the trick:

      if(!isset($_SESSION['spam_code']) || !isset($_POST['spam_code']) || $_SESSION['spam_code'] != strtoupper($_POST['spam_code'])) {
      

        Thank you so much, it works like a champ. I would have never known how to come up with that, i really need to learn how to read and write this stuff.

          Write a Reply...