I am writing a basic PHP login/Registration script and for some reason as soon as I add a PHP command the HTML isn't loaded. I had a look at the source but there is nothing loaded at all. I am hoping I have missed something very basic, but I am also having a couple of teething issues with the version of PHP installed on the web server.
<?php require_once('connect.php'); if(isset($_POST) & !empty($_POST)){ $username = mysql_real_escape_string($_POST['username']); $email = mysql_real_escape_string($_POST['email']); $password =md5($_POST['password']); $sql = "INSERT INTO 'login' (username, email, password) VALUES ('$username, $email, $password)"; $result = mysql_query($connection, $sql); if($result){ echo "User Rego Secusseflllgk"; }else{ echo "User rego faile"; } } ?> <!DOCTYPE html> <html> <head> <title>USer Reg in PHP & MySQL</title> </head> <center> <body> <div class="container"> <form class="form-signin" method="POST"> <h2 class="form-sigin-heading">Please register</h2> <div class="input-group"> <span class="input-group-addon" id="basic-addon1">@</span> <input type="test" name="username" class="form-control" placeholder="Username" required> </div> <label for="inputEmail" class="sr-only">Password</label> <input type="email" name="email" id="inputEmail" class="form-control" placeholder="Email address" required autofocus> <label for="inputPassword" class="sr-only">Password</label> <input type="password" name="password" id="inputPassword" class="form-control" placeholder="Password" required> <button class="btn btn-lg btn-primary btn-block" type="submit">Register</button> <a class="btn btn-lg btn-primary btn-block" href="login.php">Login</a> </form> </div> </body> </html> I tried to print the POST request but this didnt shed any light on the issue
print_r($_POST);