Create Simple Login form in PHP without Database[With Source Code]

Create Simple Login form in PHP without Database[With Source Code]

RunCodes

7 лет назад

47,451 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

Rachel Brinkley
Rachel Brinkley - 19.02.2023 17:40

Where is the source code because it isn't on the website you provided.

Ответить
Mohamed Amine Benmajid
Mohamed Amine Benmajid - 25.11.2022 12:40

da best

Ответить
Wolfre Vokcats
Wolfre Vokcats - 24.11.2022 15:51

Thanks

<?php
if(isset($_POST['submit']))
{
$user = $_POST['username'];
$pass = $_POST['password'];
if($user == 'admin' && $pass == 'admin')
{
echo 'username and password matched';
}
else
{
echo 'error! please enter correct data';
}
}
?>

<html>
<body>
<form action="" method='post'>
<table align="center">
<tr>
<td>username:</td>
<td><input type="text" name='username' placeholder="enter your username"></td>
</tr>
<tr>
<td>password:</td>
<td><input type="password" name="password" placeholder="enter your password"></td>
</tr>
<tr>
<td></td>
<td><input type="submit" name="submit" value="submit"></td>
</tr>
</table>
</form>
</body>
</html>

Ответить
The Storybook
The Storybook - 18.11.2022 16:29

Sir in php , how to show the data in table without using mysql database...sir pls reply share a resource...

Ответить
Py Sanjaya
Py Sanjaya - 07.08.2022 15:03

Hi sup.. can you make if username & password is true, then directing to index.html?

Ответить
Hana Hoshino
Hana Hoshino - 19.08.2021 14:36

there's no source code

Ответить
Johny Bravo
Johny Bravo - 05.07.2021 12:52

THANK YOU SO MUCH YOU SAVE MY LIFE

Ответить
ilker aykut
ilker aykut - 21.06.2021 17:04

When we right click on google chrome or another browser and click on inspect how we can hide if($user="admin" ..) part?

Ответить
Rathee entertainment
Rathee entertainment - 02.05.2021 12:27

not working
and code is note a found in given website

Ответить
Kavya Chandran
Kavya Chandran - 16.04.2021 21:10

can we run login page without using the database??

Ответить
Mohidul Hassan
Mohidul Hassan - 04.03.2020 22:21

at line 17 you have to write name="password" like 13 number line.

Ответить
Abcd
Abcd - 13.01.2020 17:33

dude it didn't work for me

Ответить
Paavo Gebbet
Paavo Gebbet - 17.12.2019 23:30

Well. If i had txt file called usersandpassword.txt, how I could take those lines "myusername:mypassword" to the login system?

Ответить
C
C - 16.11.2019 00:55

Good video, but it's vulnerable to SQL injection :/

Ответить
FIRST LAST
FIRST LAST - 26.05.2019 21:49

My Server does not support (or is not configured for) POST method. Error 405 will result on client browser immediately after submit. Will this code work if I use the "GET" Method alternatively?

Ответить
DavidB
DavidB - 21.02.2019 20:37

And how to set the "correct data" like USERNAME= teacher PASWORD=124sd7 ?

Ответить
Hema Prasanthi
Hema Prasanthi - 11.11.2018 03:18

Thank you!! you really saved me

Ответить
timestamp
timestamp - 07.09.2018 17:33

Is this method vulnerable? (like mysql query with sql injection...)

Ответить
Soy sandra rivas
Soy sandra rivas - 03.08.2018 08:59

It doesn’t work

Ответить
MisterTracks
MisterTracks - 23.06.2017 14:03

Nice! Keep it up!

Ответить