Can anyone give a bit of guidance please?
I am gettnig a
I am gettnig a
as a result of the followingWarning: mysql_close(): supplied argument is not a valid MySQL-Link resource in...
Code:
<?php require('../../Connections/connBSD.php'); ?>
<?php
// create query
$query = "SELECT welcome FROM users WHERE username = '$kt_login_user' limit 1";
// execute query
$result = mysql_query($query) or die ("Error in query: $query. ".mysql_error());
// see if any rows were returned
if (mysql_num_rows($result) > 0) {
// yes
// print them one after another
echo "<table cellpadding=10 border=1>";
// while($row = mysql_fetch_row($result)) {
// while(list($id, $country, $animal) = mysql_fetch_row($result)) {
while($row = mysql_fetch_object($result)) {
echo "<tr>";
echo "<td>".$row->welcome."</td>";
echo "</tr>";
}
echo "</table>";
}
else {
// no
// print status message
echo "No rows found!";
}
// close connection
mysql_close();
?>
Thanks