Hi ich habe ein Problem beim erstellen einer Website. Ich möchte vorerst einen Login erstellen der auf eine Mssql Datenbank zugreift. Jedoch wenn ich versuche mit der Datenbank zu verbinden, kommt folgender Fehler: Fatal error: Call to undefined function mssql_connect() in C:\xampp\htdocs\log_Action.php on line 2.
Ich bitte um schnelle Hilfe.
Hier der Code in PHP:
<?php
$conn = mssql_connect("PRAKTIKUM\SERVER", "Michel", "l45xy2qwe6");
if(!$conn || !mssql_select_db("php", $conn))
{
die(print_r(sqlsrv_errors(), true));
}
$username = $_REQUEST["uNm"];
$password = $_REQUEST["uPw"];
$tsql = "SELECT * FROM li WHERE uNm=$username AND uPw=$password";
$stmt = sqlsrv_query( $conn, $tsql, array(), array( "Scrollable" => SQLSRV_CURSOR_KEYSET ));
if($stmt == true){
$_SESSION["valid_user"] = true;
$_SESSION["uNm"] = $username;
header("Location: index.php");
die();
}else{
header("Location: error.html");
die();
}
?>
Danke schonmal im Vorraus.
LG Jan