ich diesen Fehler:Warum kann ich keine Verbindung zur MySQL-Datenbank herstellen?
Fatal error: Uncaught Error: Call to undefined function mysql_connect() in C:\xampp\htdocs\login\dbconnect.php:3 Stack trace: #0 C:\xampp\htdocs\login\index.php(3): include_once() #1 {main} thrown in C:\xampp\htdocs\login\dbconnect.php on line 3
Dies ist, wie mein Code wie
<?php
error_reporting(E_ALL & ~E_DEPRECATED & ~E_NOTICE);
if(!mysql_connect("localhost","root",""))
{
die('oops connection problem ! --> '.mysql_error());
}
if(!mysql_select_db("dbtest"))
{
die('oops database selection problem ! --> '.mysql_error());
}
?>
Welche Version von Xampp? Alle Funktionen, die mit * mysql_ * beginnen, wurden aus PHP 7+ entfernt. –