how to convert from an Array to string conversion I keep being prompt with error messages. Having tried the other recommendations but no luck. this is what i have so far.
<?php
// Create connection
$con=mysqli_connect("********","***","*****","blocklist");
// Check connection
if (mysqli_connect_errno())
{
echo "Failed to connect to MySQL: " . mysqli_connect_error();
}
$query = "SELECT addresses from addresstbl;";
$result = query($query,$error);
if (!$result) { echo "error: $error"; }
$deny = array("$query");
if (in_array ($_SERVER['REMOTE_ADDR'], $deny)) {
header("location: http://www.google.com/");
exit();
} ?>
$deny = array("$query");doesn't do what you think it does.$denywill be set toarray('SELECT addresses from addresstbl;'). You need to look for your IP address in the$result.