xTheBlackGrouse xTheBlackGrouse - 2 years ago 119
PHP Question

PHP Login / Register form

This question has had to be removed.

Answer Source

All of your constants have invalid names. You can't name a constant MySQL.studentwebserver.co.uk nor p@55word.

According to the docs:

A valid constant name starts with a letter or underscore, followed by any number of letters, numbers, or underscores.

Source: http://php.net/manual/en/language.constants.php

You'll need to rename your constants to have valid names:

define("DB_SERVER", "localhost"); // Host name
define("DB_USER", "sec_user");    // Database Username 
define("DB_PASS", "eKcGZr59zAa2BEWU");    // Database Password 
define("DB_NAME", "secure_login");    // Database Name

Then you should be able to connect to your database:

$mysqli = new mysqli(DB_SERVER, DB_USER, DB_PASS, DB_NAME);
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download