<?php
$getdatum = $_POST["notdienstdatum"];
mysql_connect("127.0.0.3","db","password");
mysql_select_db("db");
$dbselect = "SELECT apotheke FROM wp_notdienst WHERE datum = '$getdatum'";
$dbquery = mysql_query($dbselect);
$dbcount = mysql_num_rows($dbquery);
$dboutput = mysql_fetch_assoc($dbquery);
echo utf8_encode($dboutput["apotheke"]);
?>
How can I update the code so it's working with newer versions of PHP? I've already tried to make a new connection over
$conn = new mysqli($servername, $username, $password);
but I have problems to make mysql_query
working..
Thanks for helping me out