Jump to content

Recommended Posts

Posted

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!

Screenshot 2024-07-06 at 9.47.23 AM.png

  • 3 weeks later...
Posted

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

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...