0

The following PHP file (login.php) is returning HTTP ERROR 500. When deleting the php from the file and running, I am then able to then see the HTML/CSS of my login form, except the form (obviously) does not work.

Not sure which aspect of the php is causing the issue maybe db.php or class.php?

Any and all help is appreciated.

<?php
require_once('load.php');
if ( $_GET('action') == 'logout' ) {
    $loggedout = $j->logout();
}

$logged = $j->login('index.php');
?>
<html>
    <body>
        <p>html/css content...</p>
    </body>
</html>

The load.php script is as follows:

<?php
    //Load all the required files in order
    require_once(dirname(__FILE__) . '/config.php');
    require_once(dirname(__FILE__) . '/j_includes/db.php');
    require_once(dirname(__FILE__) . '/j_includes/class.php');
?>
Michael Philibin
  • 373
  • 1
  • 2
  • 16
  • Turn on errors, check the error logs. The php-error log will tell you what is failing, and giving you the 500 error. – junkfoodjunkie Apr 16 '17 at 14:07
  • Typo: `$_GET('action')` => `$_GET['action']`, it's not a function, it's a superglobal/array. Error-reporting as stated above would notify you of that faster than posting such a question ;-) http://stackoverflow.com/questions/845021/how-to-get-useful-error-messages-in-php – Qirel Apr 16 '17 at 14:10
  • Ugh, ^^^^^ it was a typo!!! thank – Michael Philibin Apr 16 '17 at 14:12

0 Answers0