Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in /home/iraorg/domains/iranwebsazan.org/public_html/webhosting/plugins/revslider1/includes/operations.class.php on line 2758

Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in /home/iraorg/domains/iranwebsazan.org/public_html/webhosting/plugins/revslider1/includes/operations.class.php on line 2762

Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in /home/iraorg/domains/iranwebsazan.org/public_html/webhosting/plugins/revslider1/includes/output.class.php on line 3706
سوال: کد وررود کار نمیکنه | طراحی سایت خبری
تماس با ما: 02166057992 چت آنلاین   ورود

سوال: کد وررود کار نمیکنه


با سلام
کد وررودم کار نمیکنه
ذخیره میکنه ولی وررود نمیده


<?php
session_start();
require_once "../config/database.php";


if (isset($_POST['login_Send']))
{
try {
$username = $_POST['username'];
$password = md5($_POST['password']);


if (empty($username) || empty($password)) {
$error = "Both fields are required.";
} else {
$query = $conn->prepare("SELECT * FROM `user_profile` WHERE `username` = `$username` AND `password` = `$password`");
$query->bind_param('ss', $username,$password);
$query->execute();

$result = mysqli_query($conn, $query);

if(mysqli_num_rows($result) > 0)
{
while ($row = mysqli_fetch_assoc($result))
{
$id = $row["id"];
$username = $row["username"];
$_SESSION["id"] = $id;
$_SESSION["username"] = $username;
}
header("location: ../panel.php");
}else{
echo "invalid username && password";
}

}
} catch (Exception $e) {
echo "Connection failed: " . $e->getMessage();
}
}


ممنون



برنامه نویس
جهت کسب اطلاعات بیشتر به انجمن برنامه نویس مراجعه نمایید

نظرات شما

WhatsApp chat