![]() |
![]() ![]() |
![]() |
![]()
Post
#1
|
|
Grupa: Zarejestrowani Postów: 1 Pomógł: 0 Dołączył: 27.09.2017 Ostrzeżenie: (0%) ![]() ![]() |
Cześć, napotkałem taki oto problem :
Warning: mysqli_num_rows() expects parameter 1 to be mysqli_result, boolean given in /home/u580164371/public_html/login.php on line 17 nie rozumiem w czym jest problem i proszę o szybką pomoc. tutaj macie jeszcze kod Z góry dziękuję ![]() <!DOCTYPE html> <?php $filename = 'install.php'; if (file_exists($filename)) { echo ("<center><font color='red'><b>/install.php still exists<br> After installing please delete install.php</center></font></b>"); } else { if (isset($_POST['Login'])){ include('config.php'); $connection = mysqli_connect($host, $username, $password, $db_name); if (mysqli_connect_errno($connection)) die("Can't connect to database"); $myusername=$_POST['myusername']; $mypassword=$_POST['mypassword']; $sql="SELECT * FROM $tbl_name WHERE username='$myusername' and password='$mypassword'"; $result=mysqli_query($connection, $sql); mysqli_num_rows($result); if($count >= 1){ session_register("myusername"); session_register("mypassword"); header("location: index.php"); } else { } } ?> |
|
|
![]()
Post
#2
|
|
Grupa: Zarejestrowani Postów: 6 380 Pomógł: 1116 Dołączył: 30.08.2006 Ostrzeżenie: (0%) ![]() ![]() |
Wchodzi w dokumentację http://php.net/manual/pl/mysqli.query.php i czytasz: Returns FALSE on failure Już wiesz że zapytanie się nie powiodło.
https://prophp.pl/advice/show/14/jak_czytac...mentacje_php%3F -------------------- |
|
|
![]() ![]() |
![]() |
Aktualny czas: 20.08.2025 - 12:35 |