Jump to content


  • Content Count

  • Joined

  • Last visited

Community Reputation

0 Neutral

About Alexa

  • Rank

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. So, I tried your suggestion. The problem was that the form got submitted before entering the data. Anyway, https://codeshack.io/secure-login-system-php-mysql/ I found this site and from here I made a working login. I need to read more about php sessions and post and get. But one last question, for example if I start a session on the config/database.php file must I start another one in the login.php? Or the session must be uniquely defined in one folder? Thank you for all the help. I will mark both answers as solution as they helped me kind of figure out the problem.
  2. I tried and implemented your suggestion, but the problem remains the same..
  3. So, I had some undefined variable errors and I solved them by deleting that code from the login_view.php file, as I don't need them now. But if I leave the input fields empty and hit submit, the problem remains the same: nothing happens, no error messages displayed
  4. cyberRobot, thanks for the advice. I noticed there is a problem with the if(isset($_POST["submit"])), but I don't know how to solve it
  5. I also tried to add session variables and the result is the same
  6. <?php if($error["alert"] != ''){ echo "<div class='alert'>".$error["alert"]."</div>"; } ?> I also tried to add session variables and the result is the same
  7. Hi! I have 2 files based on the Model View Arhitecture. The file login.php and the config file containing the db connection are in the model folder and the login_view is in view folder. I am trying to make a login form am display some error messages to the user, but I don't get the error messages. Can you help me figure it out? PS: the connection to the db works fine! Thx! LOGIN.PHP <?php //start the session session_start(); foreach (glob("model/*.php") as $filename) { include $filename; } //form defaults $error["alert"]= ""; $error["user"]= ""; $
  8. And benanamen, then, how should I do it?😀
  9. Ok. I will try it. Can I also attach the whole files for you to be easier to check ?:)
  10. The error is not displayed. Actually, nothing is displayed. Only a refresh to the page is done. I used the same piece of code for the login page, and there it works wonders.
  11. Hi! I am trying to use the View Model Design Pattern in my application The problem is that it is the first time I use it and I am a beginner. So, I have the logic in the Model and the "front end" in View. I am talking about a sign up page. In the current Html file I am trying to access an error array from the model file and display it to the user above the input field. Here is the a snippet from the Model (Signup.php) $account = new Account($con); //the account which takes as param the db connection $error = null; //the array // anything the user writes get
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.