good afternoon mga ka phcorner. na format po kasi pc ko dahil nasira yung os po, ngayon na buckup ko naman po yung database at mismong code pero ngayon po ayaw pumasok sa log in.
eto yung error ko :
eto po yung code ko sa log in called
eto din po yung database ko called
gumamit din pala ako nang
eto yung error ko :
eto po yung code ko sa log in called
login_run.php
PHP:
<?php
require('connection.php');
if (isset($_POST['submit'])) {
$usern = $_POST['usern'];
$passw = $_POST['passw'];
$query = "SELECT * FROM users WHERE usern='$usern' AND passw='".md5($passw)."' AND verify_status=1 ";
$result = mysqli_query($con, $query);
$row = mysqli_fetch_array($result);
if (mysqli_num_rows($result) > 0 ) {
$_SESSION["usern"] = $usern;
session_start();
$user_type = strtoupper($row['user_type']);
switch ($user_type) {
case 'ADMIN':
header("Location: admin/index.php");
/* echo $user_type ; */
break;
default:
header("Location: index.php");
/* echo $user_type ; */
}
$_SESSION["usern"] = $usern;
} else {
var_dump($usern);
var_dump($passw);
echo "<h2>You enetr the worng Username/Passowrd or The account is not been authenticated.</h2>";
echo nl2br("<h3><a href='login.php'>Click here</a> to go back to Log-in page.</h3");
}
} else {
echo "your a beast";
}
eto din po yung database ko called
obs
:gumamit din pala ako nang
.md5
pang encrypt nang password po. salamatAttachments
-
You do not have permission to view the full content of this post. Log in or register now.