-1
I made a page to register information of a student in the mysql database, but when sending the form data, it returns these errors: Notice: Undefined variable: mysqli in C: xampp htdocs Easytec cadastra_usuario.php on line 12
Fatal error: Uncaught Error: Call to a Member Function query() on null in C: xampp htdocs Easytec cadastra_usuario.php:12 Stack trace: #0 {main} thrown in C: xampp htdocs Easytec cadastra_usuario.php on line 12
If anyone can help I’d appreciate it!
post your code so that everyone can see better what the problem is and can guide you
– Luan Brito
Blz, I added by photo since the site ate my code
– Lucas_Squ4nchy
in the.php connection no need to create this $mysqli out of function, and tbm needed you to assign your role’s Return to some registry variable.php
– Luan Brito
Let me see, so the right thing is to put $mysqli as parameter? Is that I am layman in php
– Lucas_Squ4nchy
takes the $mysqli that is outside of the function opens.In the connection.php file, in the register.php you put this below include: $mysqli = open() and forehead.
– Luan Brito