[Guide] MySQL User Login And Registration

Asslam-O-Alaikum!
This is my first guidepost on kodular community.

By implementing this method you can create a user Login, Registration and also you can display user profile easily by using Post method.

Note
This Login System based on Email and Password

First You have to download zip file.

PHPLoginRegistrationProfile.zip (1.9 KB)

Extract this zip file so you will get 4 php files

Now open DatabaseConfig.php file and add your database details. Upload these 4 files on your hosting

Now come back to kodular and create a new project and take these components

Web component
Label
Button

Goto Blocks Section

Take 2 Variables
Login URL (Paste Your Database URL like This)
https://your-site.com/UserLogin.php

Register URL (Paste Your Database URL like This)
https://your-site.com/UserRegistration.php

Profile URL (Paste Your Database URL like This)
https://your-site.com/ViewUserData.php

Display User Profile by Email User Address

This Will Return Data in JSON Format.

Use Kodular JSON Component to parse the result.

Note: You can expand this code according to your need and if need any help regarding this just post your issue i will try to help you

Love from PAKISTAN :pakistan:

14 Likes

Maybe you can attach the php files itself. Discourse can act strangely when pasting for instance html code or maybe even php.

2 Likes

Your PHP script is not secured against SQL injection, Watch out.

you should use PDO to connect your database and prepared request for your queries

SQL injection

3 Likes

Okay Thank you

1 Like

How to protect from http captured?
I think this is the big issue…

Yeah You’re right but maybe we can use google authentication to avoid this

1 Like

I had tried, this is not the solution i am working on it. I am making a secure nodejs app for mysql database. Maybe this is helpful.

I think the author is not going to use it as it is in the example, he just did an … example … :wink: :+1:

Hey, What you think about this mysql_real_escape_string() is it helpful to avoid sql injection :syringe:

2 Likes

Hello

no, you have to use prepared queries, only real way to prevent SQL injection :

1 Like

can I have the aia files

1 Like