Related posts

31 Thoughts to “Android Login And Registration Using PHP And MySQL”

  1. Khalid mohammed

    Thank you

  2. Please can you help me source code to retrieve data from mysql database

  3. Angel Lopez

    Hola Abdelhamid Ahmed,
    Excelente el vídeo y muy buena la presentación. Solo pedirle un favor, si puedes compartir el código fuente de: Android Login and Registration system using MySQl Database, estaré muy agradecido. Sin mas reciba saludos cordiales.

  4. kaki

    Thanks for All, But it didn’t Work, I
    get message while i want to add to my BD :
    ( ! ) Warning: mysqli_num_rows() expects parameter 1 to be mysqli_result, bool given in C:\wamp64\www\loginregister\register.php on line 17
    Call Stack
    # Time Memory Function Location
    1 0.0001 405624 {main}( ) …\register.php:0
    2 0.0151 454032 mysqli_num_rows ( ) …\register.php:17

    ( ! ) Warning: mysqli_num_rows() expects parameter 1 to be mysqli_result, bool given in C:\wamp64\www\loginregister\register.php on line 19
    Call Stack
    # Time Memory Function Location
    1 0.0001 405624 {main}( ) …\register.php:0
    2 0.0672 454648 mysqli_num_rows ( ) …\register.php:19
    Failed to register you account

    1. There are errors in sql select query of $sqlCheckUsername and $sqlCheckEmail. you may added wrong table or columns names.

      1. mohammed ahmed

        when i click login it shows me login success put not opening app start activity what can id do?

  5. kaki

    thank’s Abdelhamid Ahmed, it’s very beautiful work.
    When I tape the information in register Form (Create new Account) and Clock to register , I get this message and Apllication is stopped (LoginRegistration à cessée de fonctionnée).

    1. Thank you Kaki, I just need to catch the error, please follow up steps in handle errors page and send the me the errors in logCat to solve it.

  6. Ridhaan

    I get error ‘’

    1. There is an error in php script.

    2. washin

      Did you solve this error.. Please help!! 🙂
      @Abdelhamid Ahmed sir..

      1. washin

        I get this type error showing in tost message ‘’

        1. client error is due to code error in php script or you the script in the wrong path. please check first the code you can copy it from the article. also you can test the script by submitting true POST values and call the script url in address bar if there is errors copy it and comment it.

          1. washin

            I run register.php code on browser it working fine and saved details on db but i connect to app its not working. where is that error occured. this is path String url = “”;
            PC ip add -
            htdoc folder -New
            php file – register.php
            @Abdelhamid Ahmed

          2. “” use this url

  7. Ritu

    volley timeout error

    1. Velu

      did you solved your error?please i too faced same error

  8. kaki

    2020-07-28 09:27:17.857 22355-22355/com.example.loginregistration E/AndroidRuntime: FATAL EXCEPTION: main
    Process: com.example.loginregistration, PID: 22355
    java.lang.NullPointerException: Attempt to invoke virtual method ‘’ on a null object reference
    at com.example.loginregistration.MySingleton.addToRequestQueue(
    at com.example.loginregistration.MainActivity.login(
    at com.example.loginregistration.MainActivity.access$000(
    at com.example.loginregistration.MainActivity$1.onClick(
    at android.view.View.performClick(
    at android.view.View$
    at android.os.Handler.handleCallback(
    at android.os.Handler.dispatchMessage(
    at android.os.Looper.loop(
    at java.lang.reflect.Method.invoke(Native Method)
    2020-07-28 09:27:22.841 22355-22366/com.example.loginregistration I/art: Enter while loop.
    2020-07-28 09:27:23.731 22355-22366/com.example.loginregistration I/art: Enter while loop.

    1. That means you are using volley request that it has not initiated. Try add the request to singleton.

      1. Nehemia Korir

        I got volley timeout error

  9. Konrad

    prefStatus not found

  10. boy

    login php not working
    Notice: Undefined index: email in C:\xampp\htdocs\VS\login.php on line 3

    Notice: Undefined index: psw in C:\xampp\htdocs\VS\login.php on line 4
    This Email is not valid} } else{ echo “Connection Error”; } ?> else{ echo “Connection Error”; } ?>

  11. Mehmet Deneme

    There are too many errors. Can you rearrange and put the project on github?

  12. Velu

    Hi , i have faced error while doing registration, pressing register button it take more time and showing progressive dialog and after 3 to 4 mins its shown volley timeout error please help us to solve this issue


    Thanks Ahmed

  14. Kenn Escosura

    “” how to solved this?

  15. Anamta Yousuf

    I solved the errors but still after running register.php it says failed to register. Why??

  16. Atharva

    hii Android Hands,

    i am following all the steps properly.

    but my register was getting failed

    why?? please help me please!!!

    reply me!!

  17. oliyad molalegn

    please send source code

  18. […] 3. Android Login And Registration Using PHP And MySQL … […]

Leave a Comment