Announcement

Collapse
No announcement yet.

Login Form

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Login Form

    I have used the control app to create a login form. The login form is supposed to verify the authorized users and passwords before allowing access to the main application. However, I am unable to make it work to authenticate my Mssql Native Server. The onValidate event keeps prompting back the old message that I have coded in earlier. Even now that I have all the codes erased from the onValidate event, upon clicking the OK button, I still received the old error message, which prompted "OK".

    The code is somewhat like this:
    $usr = {UserID};
    $pwd = {Password};
    $sql = "Select * from tblUser Where (userID = '".$usr."') AND (password = '".pwd."')";

    sc_lookup(ds, $sql);

    if (isset({ds[0][0]}))
    {
    //echo "OK";
    sc_redir(CustomerList.php)
    }
    else
    {
    echo "Something is wrong";
    }

    Help would be highly appreciated. I figured this has something to do with history cookies or something?

    Thanks
    George

  • #2
    If you are working in version 7 there's a problem where changes are stored, but not used in (new) generations. .pwd. should be .$pwd. but I assume this is a typo. Don't forget to prevent the code for sql injection. This code is not safe!
    Albert Drent
    aducom software netherlands
    scriptcase partner, reseller, support and (turn-key) development
    www.scriptcase.eu / www.scriptcase.nl

    Comment


    • #3
      Thank you Albert for your prompt reply. I am very new to scriptcase. The missing $ is a typo, you are right.

      So, what you mean is this is a problem with version 7? Any solution or workaround? How can I clear this variables after being used?

      George
      Last edited by geotsv; 02-03-2013, 10:06 PM.

      Comment


      • #4
        There's a main issue with version 7 which currently doesn't have a work-around. I expect that SC will address this asap.
        Albert Drent
        aducom software netherlands
        scriptcase partner, reseller, support and (turn-key) development
        www.scriptcase.eu / www.scriptcase.nl

        Comment


        • #5
          Thanks Albert!

          George

          Comment


          • #6
            The issue is solved, you need to apply a setting in php.ini, see sticky message.
            Albert Drent
            aducom software netherlands
            scriptcase partner, reseller, support and (turn-key) development
            www.scriptcase.eu / www.scriptcase.nl

            Comment


            • #7
              Hello,

              This issue was already addressed, please see: http://forum.scriptcase.net/showthre...rcecode-SOLVED


              regards,
              Bernhard Bernsmann

              Comment

              Working...
              X