I need simple php login form with sql express. I am using sql express 2012.
I tried the below coding:
<?php include 'connection.php'; ?>
<?php
session_start();
$username = $password = $userError = $passError = $database='';
if (isset($_POST['username']) and isset($_POST['password'])){
$username = $_POST['username'];
$password = $_POST['password'];
$sql= "SELECT * FROM uinfo WHERE username='$username' and store='$password'";
$stmt = sqlsrv_query( $conn, $sql );
if( $stmt === false) {
die( print_r( sqlsrv_errors(), true) );
}
}
?>