Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 656135
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T22:40:51+00:00 2026-05-13T22:40:51+00:00

I have this code: btn_jouer.onRelease = function () { verif = txt_email_user.text; if (txt_email_user.text

  • 0

I have this code:

btn_jouer.onRelease = function ()
{
    verif = txt_email_user.text;
    if (txt_email_user.text == "")
    {
        txt_erreur.textColor = 16724736;
        txt_erreur.text = "Champ(s) manquant(s)";
    }
    else if (verif.indexOf("@", 0) == -1 || verif.indexOf(".", 0) == -1)
    {
        txt_erreur.textColor = 16724736;
        txt_erreur.text = "Adresse E-mail invalide";
    }
    else
    {
        php_login = new LoadVars();
        php_login.email = txt_email_user.text;
        php_login.sendAndLoad(_root.page_Login, php_login, "POST");
        php_login.onLoad = function(succes)
        {
            if (succes)
            {
        //txt_erreur.text = php_login.etat;
        //return;
                if (php_login.etat == "exist")
                {
                    _root.var_user.id = php_login.id;
                    _root.var_user.nom = php_login.nom;
                    _root.var_user.prenom = php_login.prenom;
                    _root.var_user.score = php_login.score;
                    _root.MovieLogin.unloadMovie();
                    if (_root._root.selectedPhone == "KS360")
                    {
                        _root.gotoAndStop(4);
                    }
                    else
                    {
                        _root.gotoAndStop(3);
                    } // end else if
                }
                else if (php_login.etat == "non")
                {
                    trace (php_login.etat);
                    txt_erreur.text = "Email non enregistré! veuillez vous s'inscrir";
                } // end if
            } // end else if
        };
    } // end else if
};

The “page_Login” is login.php file on the server,
After debugging, the file login.php successfully received Posted data so i got:
$_POST[’email’] = “what ever you type in swf form”;

The login.php processor file:

if(isset($_REQUEST['email'])){
    $email = strtolower(addslashes($_REQUEST['email']));
    $DB->_request("select * from gamers where email='$email'");
    if($DB->_nr() > 0) {
        $row = mysql_fetch_array($DB->Result);
        echo "&etat=exist&nom={$row['nom']}&prenom={$row['prenom']}&score={$row['score']}";
        //
        exit;
    }
    else {
        echo "&etat=non";
        exit;
    }
}

Here above, the $DB->_nr() always returns “0” even the email address exists!

I have tried to create a simple html page having a form with method POST and have a simple input type text with a name=”email”
When i write my email which is valid in the database and hit submit $DB->_nr() returns 1.

This really is driving me crazy, i’m sure that the email address exists, the login.php page receive posted data “email = validemail@domain.com” from SendAndLoad(); but mysql_num_rows returns 0.

Any one there had the same issue??
Any help would be so much appreciated!

Barry,

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T22:40:51+00:00Added an answer on May 13, 2026 at 10:40 pm

    Use the following code in PHP to compare the email in both cases: given from flash and from HTML form:

    if(isset($_REQUEST['email'])){
        //createa the testFile.txt and give it attributes with 0777 for permission (in case you are under linux)
        $myFile = "testFile.txt";
        $fh = fopen($myFile, 'a') or die("can't open file");
        fwrite($fh, "-".$_REQUEST['email']."-\r\n");
        fclose($fh);
    
        $email = strtolower(addslashes($_REQUEST['email']));
        $DB->_request("select * from gamers where email='$email'");
        if($DB->_nr() > 0) {
            $row = mysql_fetch_array($DB->Result);
            echo "&etat=exist&nom={$row['nom']}&prenom={$row['prenom']}&score={$row['score']}";
            //
            exit;
        }
        else {
            echo "&etat=non";
            exit;
        }
    }
    

    if you test for both of the cases, you will be able to compare the two exact forms. I have put “-” in the front and the end of it just to see if there are any whitespaces next to the email value.

    Please reply with a compare result. thank you.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.