Hardik Parsania

I am mobile app developer. I am always passionate about solving complex and real world problems.I have developed many apps with great interest and superior logical skills.

You may also like...

21 Responses

  1. Felix Kiamba says:

    Am following this example for my login but using asp.net endpoint http://197.232.17.86/MjaliAPP/UserLogin
    with parameters username and password. When i use this endpoint its not parsing the parameters to the url. Please help

  2. John says:

    Hi thanks for the Android Login And Registration Example With PHP MySQL Session Management tutorial, kudos to you. Is there a way to prevent a user from using another persons
    crdentials i.e preventing user A from using user B credentials on his unless he registers. Is there a way
    to make the password locked to phone number or imei of a device. If the user B wants to use user A password
    the app should prompt or show dialog “password already in use by another user”. Kindly help

    • Hardik Parsania says:

      I have made similar restriction for username. UserA can not use username of UserB. You can make restriction for password also.You just need to change simpleregister.php file.

      • John says:

        Thanks for your response can you enlighten me on how you did your restriction for usernames

      • amie says:

        thanx a lot for your help.can i get code for json_parsing.php. After entering data in login form and submit i get message no data.can you help me whats wrong?

        • Hardik Parsania says:

          Code for json_parsing.php

          < ?php // echo $_SERVER["DOCUMENT_ROOT"]; // /home1/demonuts/public_html //including the database connection file include_once("config.php"); $query="SELECT * FROM demo_table"; $result= mysqli_query($con, $query); //create an array $emparray = array(); if(mysqli_num_rows($result) > 0){
          while ($row = mysqli_fetch_assoc($result)) {
          $emparray[] = $row;
          }
          }
          echo json_encode(array( “status” => “true”,”message” => “Data fetched successfully!”,”data” => $emparray) );
          ?>

    • Andile Simelane says:

      Why does one need every user to have unique password? but then you can
      1. Before inserting the user in ur database first select in the database. check using
      $pass=mysqli_escape_string($conn,$_POST[‘password’]);;
      $result=select * from users where password ='”.$pass.”‘;
      if(mysqli_num_rows($results)>0).{
      echo”Password is already in use”;
      }else{
      //put on your registration code here
      }

      I don’t tthink it practically make sense though to make a unique password, it I think username its fine.

  3. Salmanrajz says:

    Hello can you tell me how can i run another activity after login ?
    please help as fast you can thanks.

    • Hardik Parsania says:

      I have already started WelcomeActivity when user successfully login. Edit there with your activity.

  4. Roman Evarist says:

    Hello, Thank you for sharing these sketches, I am new to android programming, I have just copied the files you have posted and modified the variables to match my requirement, but when I test the login page by try to login it just load for some seconds, like 15 sec, finally toasts a message says “No data” where by I expected “Wrong username or password”. where could I have mess-up?

    In addition, I can see on your PHP files directory, in Tennis folder, you have a file named “json_parsing.php” what is the content of this file? and what does it do? I don’t have it in my directory, could it be the source of my problem?, Please help.
    Thank you.

  5. samuel says:

    hello please samuel is my name when i search records it say no data i dont no reason why

  6. Alvin says:

    do you have any sample for a restriction? where you cant login after registering, it needs some approval first from the admin. and when the admin approves the user the user will be notify via email, that the account has been activated. Thanks 🙂

  7. Mariee says:

    When I try to log in it says no data How to Fix this?

    • Hardik Parsania says:

      in onTaskComplete() method, there is a line to print response in logcat

      Log.d(“responsejson”, response.toString());

      Can you tell me what response are you getting in your logcat?

  8. Emerson Paguia says:

    hello, can I recode your code to kotlin, or do you have already one?

Leave a Reply

Your email address will not be published. Required fields are marked *