in reply to Re: Registration Error
in thread Registration Error

I think the problem is here
# if ($dbm1{"$accountAD"} # && $dbm1{"$accountID"} =~ /^$accountAD$/) { # key values reversed if ($dbm1{"$accountAD"} && $dbm1{"$accountAD"} =~ /^$accountID$/) { # corrected
If it helps, here's code I used to debug your script, paste it in after the ties
# debug sub showdata { my ($head,$data) = @_; print qq(<table border=1><tr><td> key </td><td> $head </td></tr>\n); foreach (sort keys %$data){ print qq(<tr><td> $_ </td><td> $$data{$_} </td></tr>\n); } print q(</table>); } showdata("Unverified",\%dbm1); showdata("Verified",\%dbm2);
poj
update ; Another way to fix it is to change these round
# $dbm1{$form{'usermail'}} = "$accountID"; $dbm1{"$accountID"} = $form{'usermail'};

Replies are listed 'Best First'.
Re: Re: Re: Registration Error
by sulfericacid (Deacon) on Mar 08, 2003 at 18:38 UTC
    I've tried all the suggestions you proposed, Poj, but the results aren't changing. I actually have been doing database prints to verify things are actually stored so they can be compared to. Things are storing as I expected them to so the only possible problem is with the verification which we concluded earlier.

    Maybe what's confusing you is what's going on so I'll try to explain that small section.

    AccountID is their generated $ID number which is a 17 character string. AccountAD is their email address collected from the form. Both of these are stored in the DB1 just fine. I'm trying to verify the url_params (accountID=xxx&accountAD=xxx) to what's being stored so I can add them to DB2.

    That's what I am after anyways, is this what the code is actually doing or am I confusing that entire process? Thanks so much. sulfericacid

    "Age is nothing more than an inaccurate number bestowed upon us at birth as just another means for others to judge and classify us"

    sulfericacid
      When you say 'all the suggestions', what did you mean ? Just the update I posted was all you had to do, this makes the generated ID the key and the accountAD the value. If you do that the test should be
      if ($dbm1{"$accountAD"} # you have an accountAD to test && $dbm1{"$accountID"} =~ /^$accountAD$/) # ID is key AD is value
      poj
        I meant that I was already doing database prints to see if things were being stored, all I added new was your UPDATE change but that didn't fix the problem.

        "Age is nothing more than an inaccurate number bestowed upon us at birth as just another means for others to judge and classify us"

        sulfericacid