I am coding a simple login member system using PHP but each time I go to the PHP page the source code for the page shows up instead of the username and password box. I have this code at the top of the page:
<?php
session_start();
?>
It is right at the top of the page before anything else but when I take that code away the page show up normally but this code appears below the username and password boxes:
"; if ($_POST ['loginbtn']){ $user = $_POST['user']; $user = $_POST['password']; if ($user){ if ($password){ echo "$user - $password
$form"; } else echo "you must enter your password $form"; } else echo "you must enter your username $form"; } else echo $form; ?>
This code should only be appearing after the user has pressed submit and it shouldn't appear in that form.
.php--- Show your full code and not just two lines of it.