Hi,
I just started PHP and getting the following error when trying to read and echo something from my DB. I get Array as an result of a working SQL query (I tested it in PHPMyAdmin SQL Query) and it should be something else. Array doesnt return in the database i selected, but still it's here.
<?
$host="localhost";
$user="xxxxxxxxx";
$password="xxxxxxxxxxx";
$dbname="mohaaleague";
$connection = mysql_connect($host, $user, $password) or die ("Kan niet verbinden");
$clan = "Belgian Fun Clan";
$db = mysql_select_db ($dbname,$connection) or die("Je Stinkt");
//SELECT clan FROM clan WHERE clan='Belgian Fun Clan'
$query = "SELECT clan FROM clan" or die("Query Mislukt");
$result = mysql_query($query) or die("Query Mislukt1");
$row = mysql_fetch_array($result, MYSQL_ASSOC) or die("Query Mislukt2");
extract($row);
echo($row. "<br>");
if ( $clan == $row )
{
echo "het werkt";
}
else
{
echo "het werkt niet";
}
$disconnect = "mysql_close";
?>
Anyone plz 🙂, i really wanna know what im doing wrong..
Thnx in advance..
TGC
EDIT: a link for the result: http://82.171.153.236/mohaaleague/script%20oefen.php