Answer the question
In order to leave comments, you need to log in
Why is the hosting request not working?
Good afternoon, there is a regular select request, everything is fine on the local server, but nothing comes from the hosting database
$const = mysqli_connect('176.126.165.65', 'test' ,'test') or die ("html>script language='JavaScript'>alert('Не удается подключиться к базе данных. Повторите попытку позже.'),history.go(-1)/script>/html>") ;
mysqli_select_db( $const, "zaiavka" );
$sql = "SELECT * FROM test";
$result = $const->query($sql);
if ($result->num_rows > 0) {
while($row = $result->fetch_assoc()) {
$orders[]=$row;
}
} else {
echo "error";
}
$const->close();
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question