Dont bully me im noob
$user = $_POST[“txtloginuser”];
$pass = $_POST[“txtloginpass”];
<code>$no=0;
$result = $conn->query("select * from tblaccount where flduser = '$user' and password = '$pass'");
while($row=$result->fetch_assoc()){
$no++;
}
if($no==0){
header("location:login.php?incorrect");
}else{
header("location:main.php");
}
</code>
<code>$no=0;
$result = $conn->query("select * from tblaccount where flduser = '$user' and password = '$pass'");
while($row=$result->fetch_assoc()){
$no++;
}
if($no==0){
header("location:login.php?incorrect");
}else{
header("location:main.php");
}
</code>
$no=0;
$result = $conn->query("select * from tblaccount where flduser = '$user' and password = '$pass'");
while($row=$result->fetch_assoc()){
$no++;
}
if($no==0){
header("location:login.php?incorrect");
}else{
header("location:main.php");
}
im expecting that if the inputted data exist, the $no will increment.
New contributor
user24926359 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.