6 Replies Latest reply on Jan 5, 2016 12:21 PM by rammer123

    Can't Create Login User in Dreamweaver CC 2015

    rammer123

      I am using Dreamweaver CC 2015... I can connect to my databases but can not create a login user via a Bootstrap Modal form. Why not? I am using PHP MySQL.

        • 1. Re: Can't Create Login User in Dreamweaver CC 2015
          Level 4

          No one can tell you the answer to that question since you didn't provide any code that you're using that isn't functioning.

           

          best,

          Shocker

          • 2. Re: Can't Create Login User in Dreamweaver CC 2015
            rammer123 Level 1

            <?php

            // *** Validate request to login to this site.

            if (!isset($_SESSION)) {

              session_start();

            }

             

             

            $loginFormAction = $_SERVER['PHP_SELF'];

            if (isset($_GET['accesscheck'])) {

              $_SESSION['PrevUrl'] = $_GET['accesscheck'];

            }

             

             

            if (isset($_POST['memberID'])) {

              $loginUsername=$_POST['memberID'];

              $password=$_POST['password'];

              $MM_fldUserAuthorization = "";

              $MM_redirectLoginSuccess = "members/index.php";

              $MM_redirectLoginFailed = "index.php";

              $MM_redirecttoReferrer = true;

              mysql_select_db($database_prth7859_admin, $prth7859_admin);

             

              $LoginRS__query=sprintf("SELECT memberID, password FROM members WHERE memberID=%s AND password=%s",

                GetSQLValueString($loginUsername, "text"), GetSQLValueString($password, "text"));

              

              $LoginRS = mysql_query($LoginRS__query, $prth7859_admin) or die(mysql_error());

              $loginFoundUser = mysql_num_rows($LoginRS);

              if ($loginFoundUser) {

                 $loginStrGroup = "";

               

              if (PHP_VERSION >= 5.1) {session_regenerate_id(true);} else {session_regenerate_id();}

                //declare two session variables and assign them

                $_SESSION['MM_Username'] = $loginUsername;

                $_SESSION['MM_UserGroup'] = $loginStrGroup;     

             

             

                if (isset($_SESSION['PrevUrl']) && true) {

                  $MM_redirectLoginSuccess = $_SESSION['PrevUrl'];

                }

                header("Location: " . $MM_redirectLoginSuccess );

              }

              else {

                header("Location: ". $MM_redirectLoginFailed );

              }

            }

            ?>

            • 3. Re: Can't Create Login User in Dreamweaver CC 2015
              Level 4

              Welp, the code you provided is intended to process a form, but there isn't any code for a form to submit data to be processed. Perhaps you failed to provide the form code in your reply, which is a necessary piece of information to determine what issue you may have. As a result no one can say for sure why the code you didn't fully provide isn't working for you.

               

              best,

              Shocker

              • 4. Re: Can't Create Login User in Dreamweaver CC 2015
                rammer123 Level 1

                Yes the code of the form was provided… I can make a login in another subdomain no problem therefore I think I could be missing something. The real question I have is why this one isn’t working. Is because it’s a login using a bootstrap modal? I have made other forms (also Bootstrap Modal Forms) that work using formtoemail scripts this domain, but can’t get Login Authentication to work in the one below. It definitely shows my database… and it tests successfully . About to give up.

                 

                         

                Member Login

                 

                     




                • 5. Re: Can't Create Login User in Dreamweaver CC 2015
                  Nancy OShea Adobe Community Professional & MVP

                  You realize the deprecated server & database panels were removed from DW for a reason, right?  The code is obsolete and should not be used on current or future web projects.  The old MySQL connections won't work on servers running PHP 7.  Going forward, you should use MySQLi (improved) or PDO.

                   

                  Replace Deprecated Server Behaviors with a modern commercial extension:

                   

                   

                  Nancy O.

                  • 6. Re: Can't Create Login User in Dreamweaver CC 2015
                    rammer123 Level 1

                    Thanks Nancy,

                     

                    I know you are right… Everything else worked on the site (database connections) with the extension from DMXZone with the exception of Logon Authentication so I was just trying to get away with a fix. But in the end I will take your advice… there is little room for choice at this stage.