hi i created login page using php and mssql but i got an error
"Fatal error: Call to undefined function mssql_query() "
heres my log in code
<form name="log" action="log_action.php" method="post">
Username: <input class="form" type="text" name="name"><br />
Password: <input class="form" type="password" name="ssn"><br />
<input name="submit" type="submit" value="Submit">
</form>
log_in form
<?php
session_start();
include "ms_connection.php";
$name = $_REQUEST['name'];
$ssn = $_REQUEST['ssn'];
$query = "SELECT * FROM userinfo WHERE name = '$name' AND ssn='$ssn'";
$result = mssql_query($query,$conn);
$num = mssql_num_rows($result);
$_SESSION['valid_user'] = true;
$_SESSION['name'] = $name;
header('Location: index.php');
die();
}else{
header('Location: login1.php');
die();
}
ms_connection
<?php
$serverName = "server";
$uid = "uname";
$pwd = "upassword";
$databaseName = "dtr";
$connectionInfo = array( "UID"=>$uid,
"PWD"=>$pwd,
"Database"=>$databaseName);
/* Connect using SQL Server Authentication. */
$conn = sqlsrv_connect( $serverName, $connectionInfo);
if( $conn ) {
echo "Connection established.<br />";
}else{
echo "Connection could not be established.<br />";
die( print_r( sqlsrv_errors(), true));
}
?>