0
I’m a beginner in Mysql and PHP, and I want to basically list the information I have on db on a page html. I made the code and is returning these errors:
Warning: mysqli_select_db() expects Parameter 1 to be mysqli, string Given in C: xampp htdocs testeman vendo.php on line 10
Notice: Undefined variable: con in C: xampp htdocs testeman vendo.php on line 13
Warning: mysqli_query() expects Parameter 1 to be mysqli, string Given in C: xampp htdocs testeman vendo.php on line 13
Warning: mysqli_error() expects Exactly 1 Parameter, 0 Given in C: xampp htdocs testeman vendo.php online 13
Github of the code: https://github.com/howdruss/AjudaStack/blob/master/Duvida
NOTE: I’m new to the site and I’m confused about putting the code here.
Oops, excuse me but could you be clearer? kkk I’m beginner yet, and I got a little lost in your resolution :/
– Howdruss
looking at the code I notice a comparison if (total of $> 0) { Wrong at first instance: would be : if ($total > 0){ .
– Elizandro Schmidt
i updated the code there on github: and continue with these errors: Warning: mysqli_fetch_assoc() expects Parameter 1 to be mysqli_result, Boolean Given in C: xampp htdocs testeman vendo.php on line 14 Warning: mysqli_num_rows() expects Parameter 1 to be mysqli_result, Boolean Given in C: xampp htdocs testeman vendo.php on line 15 Warning: mysqli_free_result() expects Parameter 1 to be mysqli_result, Boolean Given in C: xampp htdocs testeman vendo.php on line 42
– Howdruss
Now that I’ve seen Voce you don’t need it because it’s calling db above: $db_select = mysqli_select_db ($Conn ,$dbname); , and so on : $query = "SELECT name, email, subject FROM your table"; $data = mysqli_query ($Conn,$query); $line = mysqli_fetch_assoc ($data); $total = mysqli_num_rows($data)
– Elizandro Schmidt
meeeeeeee, It was, it helped me a lot of dude <3
– Howdruss