Hey guys I’d like to introduce you to this way of making money through investment with swisscoin. If you’ve not heard about swisscoin before, I recommend you …
source
Hey guys I’d like to introduce you to this way of making money through investment with swisscoin. If you’ve not heard about swisscoin before, I recommend you …
source
48 responses to “Login system using PHP with MYSQL database”
http://hostingoffer94.blogspot.com/ Are you looking a good hosting offer the most
popular hosting provider 1st month hosting price only 0.01 dollar
cupon code:sharif94 visite this link and buy http://hostingoffer94.blogspot.com/
how to upload my local host database to website pls help me
REMEMBER THIS DURING YOUR FORM CREATION
Thank You I got it to work because of you and a few changes
PLEASE help me!!
$result = mysql_query("select * from users where user ='$username' and pass = '$pass'")
You created $user abd then you query it using $username
<?php
$username = $_POST['user'];
$password = $_POST['pass'];
$username = stripcslashes($username);
$password = stripcslashes($password);
$username = mysql_real_escape_string($username);
$password = mysql_real_escape_string($password);
mysql_connect("localhost", "root", "");
mysql_select_db("login");
$result = mysql_query("select * from users where username = '$username' and password = '$password'")
or die("Failed to query db " . mysql_error());
$row = mysql_fetch_array($result);
if($row['username'] == $username && $row['password'] == $password){
echo "LOgin succes!!! Welcome " . $row['username'];
}
else{
echo " failed to login!!";
}
?>
Notice: Undefined index: mp in C:UsersexamenDocumentsEasyPHP-5.3.9wwwtcmplusloginserv.php on line 3
failed to query databaseAucune base n'a été sélectionnée
Anyone who subs me, I will sub back immediately !!! Let's help each other hear!
code not clear pls send me code
i tried to remove the * in line 20 but this is still the result, how can i fix this?
Parse error: syntax error, unexpected '*' in C:wampwwwloginprocess.php on line 20
get a mic
can other people enter my panel when I do this??
Fatal error: Uncaught Error: Call to undefined function mysql_connect() in E:xamphtdocsphppractise.php:6 Stack trace: #0 {main} thrown in E:xamphtdocsphppractise.php on line 6
plzzzzzzzzzzz help me why its arise the error
why does it bring file not found…
owesome work sir g
somebody can help me?
<?php
// Valores de login.php
$username=$_POST['user'];
$password=$_POST['pass']; // Prevenir otra trayectoria de mysql $username=stripcslashes($username);
$password=stripcslashes($password);
$username=mysqli_real_escape_string($username);
$password=mysqli_real_escape_string($password); // Conexion
mysqli_connect("localhost","root", "");
mysqli_select_db("login"); // Registro del usuario
$result= mysqli_query("select * from users where username = '$username' and password = '$password'")
or die("Acceso fallido al registo" .mysqli_error());
$row= mysqli_fetch_array()($result);
if($row['username'] == $username && $row['password'] == $password && ("" !== $username || "" !== $password)) {
echo "Login Success! Welcome, ".$row['username'];
} else {
echo "Failed to Login!";
}?>
Warning: mysqli_real_escape_string() expects exactly 2 parameters, 1 given in C:wamp64wwwLoginprocess.php on line 10
( ! ) Warning: mysqli_query() expects at least 2 parameters, 1 given in C:wamp64wwwLoginprocess.php on line 18
subscribe back brother and sister, i have tutorial or how to make web proggraming?thanks
When I press login button it shows output with a notice.
Notice: Undefined variable: POST in C:xampphtdocsphpprocess.php on line 2
Notice: Undefined variable: POST in C:xampphtdocsphpprocess.php on line 3
Here is my process.php:
$username = $POST['user'];
$password = $POST['pass'];
Also note that login.php contains same id as in process.php
tres coool
#fivereborn
its not working, failed to query database No database selected
Parse error: syntax error, unexpected ')' in C:xampphtdocsLoginprocess.php on line 8
what that's wrong
Warning: mysql_connect(): php_network_getaddresses: getaddrinfo failed: ������� �������� �����������. in C:xampphtdocsloginprocess.php on line 10Warning: mysql_connect(): php_network_getaddresses: getaddrinfo failed: ������� �������� �����������. in C:xampphtdocsloginprocess.php on line 10
Failed to query databaseNo database selected
This is my problem what can I do?
hi i got a fatal error: Uncaught Error: Call to undefined function mysql_real_escape_string() in C:xampphtdocsloginprocess.php:9 Stack trace:#0 {main} thrown in C:xampphtdocsloginprocess.php on line 9. can you help me to solve the error
Parse error: syntax error, unexpected '{' in C:xampphtdocsMHOprocess.php on line 16
i don't know why this showed up help please
when i add user type, after i logged in, this error shows: mysqli_num_rows() expects parameter 1 to be mysqli_result, boolean
this is my code in php:
$type=mysql_real_escape_string($_POST['type']);
$sql="SELECT username, password, user_type from users WHERE username='$username', password='$password' and user_type = '$type'";
$result = mysqli_query($db,$sql);
if(mysqli_num_rows($result) == 1)
{
// $_SESSION['message']="You are now Loggged In";
$_SESSION['admin']= $type . " " . $username . "!";
header("location:home.php");
}
else
{
echo "<p><center><font color = red>Incorrect username, password or user type!";
}
}
code in html:
<label><h3>User Type:</h3></label>
<select name = "type" id = "comboBox">
<option value = ""></option>
<option value = "Admin"> Admin </option>
<option value = "Cashier"> Cashier </option>
</select>
help pls 🙁
Have we install MySql to work this?
thanks
Build this and it works
<?php
if(isset($_POST['btnInloggen'])){
$username = $_POST['txtGebruikersnaam'];
$password = $_POST['txtWachtwoord'];
$username = stripcslashes($username);
$password = stripcslashes($password);
$result = mysqli_query($dbcon,"select * from inloggen where gebruikersnaam = '$username' and wachtwoord = '$password'")
or die("failed to query database". mysqli_error($dbcon));
//CHECK OF AANTAL ROWS MEER IS DAN
$row= mysqli_fetch_array($result);
if ($row['gebruikersnaam'] == $username && $row['wachtwoord'] == $password){
echo "inloggen gelukt";
}
else {
echo "failed";
}
}
?>
greetings php GOD
please give code
what`s the difference between mysql and mysqli ?
Thank you! You exactly showed what I've been looking for after hours of searching! I went to almost every forum there is and no one even tried to explain this exact, "$result"-"$row" technique and the comparison from database to php-variables, to me. Very nice. You deserve a thumbs up ^^
My process.php just comes out like normal text when i log in.
<?php
// Get values passe from form in login.php file
$username = $POST['username'];
$password = $POST['password'];
// to prevent mysql injection
$username = stripcslashes($username);
$password = stripcslashes($password);
$username = mysql_real_escape_string($username);
$password = mysql_real_escape_string($password);
// connect to the server and select database
mysql_connect("localhost", "root", "");
mysql_select_db("login");
// Query the database for user
$result = mysql_query("select * from users where username = '$username and password = '$password'")
or die("Failed to query database".mysqlerror());
$row = mysql_fetch_array($result);
if ($row['username'] == $username && $row['password'] == $password) {
echo "Login success! Welcome ".$row['username'];
} else {
echo "Failed to login!";
}
?>
That's my code and also what i see when i press the login button.
Awesome video. II had to try it And can do so thanks very much, I will follow you to the next video.
i am getting this type of error,can you please suggest me to correct these error.
Parse error: syntax error, unexpected 'echo' (T_ECHO) in C:xampphtdocsloginprocess.php on line 18
why didn't u use MySQLI commands
and for what versions of php this code works
this helps but kinda outdated. nice one tho! thankyou
Hai can u work with me I ll pay u money
what should i do i i am using ubuntu. I dont have the htdocs folder to create file into,which folder should i do it
Good video, but pro-tip. Set it to playback 2x the original speed.
why won't this work?
<?php
$username = $POST['username'];
$password = $POST['password'];
$username = stripcslashes($username);
$password = stripcslashes($password);
$username = mysql_real_escape_string($username);
$password = mysql_real_escape_string($password);
mysql_connect("localhost", "root", "");
mysql_select_db("loginandregister");
$result = mysql_query("select * from users where username = '$username' and password = '$password'")
or die("Failed to query the Database".mysql_error());
$row = mysql_fetch_array($result)
if ($row['username'] == $username && $row['password'] == $password ){
echo "Login sucess! Welcome ".$row['username'];
} else {
echo "Login failed.";
}
?>
i Wanted in which is supported script software you used.
facing a problem sir can u suggest me…. error
Fatal error: Uncaught Error: Call to undefined function mysql_real_escape_string() in C:xampphtdocsgym css3 html5process.php:10 Stack trace: #0 {main} thrown in C:xampphtdocsgym css3 html5process.php on line 10
you should have entered wrong password or wrong username or keep the fields empty to show that your program is working properly on every parameter
thank u man
really hopeful
I got "Fatal error: Uncaught Error: Call to undefined function mysql_real_escape_string() in /storage/h3/217/646217/public_html/process.php:9 Stack trace: #0 {main} thrown in /storage/h3/217/646217/public_html/process.php on line 9" when submitting form. What's wrong with the code?
Add a option that admin can approve new user…
"<?php
$localhost = "localhost";
$dbuser = "admin";
$dbpass = "";
$dbname = "test";
$connect = mysql_connect($localhost, $dbuser, $dbpass);
mysql_select_db("$dbname", $connect);
?>"
Make config.php file it is easier (include"config.php") at every page you make that need connection.
'Screams internally' -me as a professional front end dev watching a back-end developer create html/css.
Just kidding, thank you for taking the time to make this video, it's been helpful.