chamberskr_3927_mentor_plus Posted July 6 Report Posted July 6 Hello everyone! My name is Kyle and I joined the Mentor Plus program two weeks ago. I just finished the PHP foundations course, and I noticed that for the final section on forms, my live server was displaying Warning messages on the login page for both the "isBlock" and "badUserCredentials" as undefined, which I guess they are until you take certain actions on the webpage. I have scoured VSCode and google trying to figure out how to turn off these warnings from displaying in live server from vscode, b/c they are not really a problem but are an eyesore on the website and have had no luck in figuring out how to turn these off? does anyone work in VSCode who could tell me how to disable these warning messages displaying in the live server? (PHP Server) Thanks in advance! Quote
marcmemarcos Posted July 24 Report Posted July 24 Hi, I think you should have to disable the warning messages in your live server for undefined variables in PHP you can turn off error reporting in your PHP code by adding error_reporting(0) at the beginning of your script. Alternatively you can use the @ operator to suppress specific warnings by prefixing the variable like @$isBlock. Thanks Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.