Skip to content
Advertisement

Script not running and I can’t find out why

I’m new to PHP and HTML, and I’m building a small CMS with those 2 languages. Not sure what I’m missing here, I’m sure it’s beginner level, but for no reason, the script below stopped working, meaning the site won’t load.

Here’s the code:

JavaScript

The connections.php file is just a linker to a database, and in order to access this site, you enter some credentials, hence the session_start();. Can someone help me really quick? 😀

Advertisement

Answer

I learnt from Zachary‘s comment that there were error logs:

Is there anything in the error logs relating to this?

I found the logs and saw that the issue was the break; command that I had in this block:

JavaScript

The issue was that the break command is used to exit a loop of some kind. Since it wasn’t in any kind of loop, the script would break down.

User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement