Results 1 to 2 of 2

Thread: Problem with Login form.

  1. #1
    Join Date
    Jul 2014

    Problem with Login form.

    Hello guys, first post here.
    I have a web system which contains a login form programmed in 3 different languages HTML, PHP and JS. The problem is that it's not working, you can access without entering any data, you just press enter and it will work, I don't know why it is not validating any credentials. I was thinking about some query problems but I don't know. I am a newbie on this. I have read a lot but haven't found an answer. A friend helped me build the system but left that uncompleted and he's nowhere to be found.
    I was wondering if you could help me out with this.

    <form role="form" ng-submit="login(user,password)">
      <div class="form-group">
        <input type="user" class="form-control" ng-model='user' placeholder="Usuario">
      <div class="form-group">
        <input type="password" class="form-control" ng-model='password' placeholder="Contraseņa">
      <div class="alert alert-warning" id='alert' style="display:none">Revise la informacion...</div>
      <div class="alert alert-danger" style="display:none" id='alertErr'>Error Usuario o Contraseņa Erronea intentelo de nuevo</div>
      <button type="submit" class="btn btn-primary">Ingresar</button>
    PHP Code:
    require_once 'database.php';
    $db = new Database();
    $body json_decode(file_get_contents('php://input'));
    $user =$db->query("SELECT * FROM usuario WHERE usua_login = '".$body->user."' AND usua_pass = '".$body->password."'");
    $user == false){
    'use strict';
     * @ngdoc function
     * @name belkitaerpApp.controller:MainCtrl
     * @description
     * # MainCtrl
     * Controller of the belkitaerpApp
      .controller('MainCtrl', function ($scope,$http,$location) {
        	$scope.login = function(user,password){
        		if(user =='' || password ==''){
                 	setTimeout(function() {
               		 }, 3000);
                 		setTimeout(function() {
               			 }, 3000);

  2. #2
    Join Date
    Mar 2007
    Simple, stop using Angular (Frameworks) to do the job of regular JavaScript, its like reinventing the wheel when the vanilla does just fine as it is.
    Yes, I know I'm about as subtle as being hit by a bus..(\\.\ Aug08)
    Yep... I say it like I see it, even if it is like a baseball bat in the nutz... (\\.\ Aug08)
    I want to leave this world the same way I came into it, Screaming, Incontinent & No memory!
    I laughed that hard I burst my colostomy bag... (\\.\ May03)
    Life for some is like a car accident... Mine is like a motorway pile up...

    Problems with Vista? :: Getting Cryptic wid it. :: The 'C' word! :: Whois?

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center

Recent Articles