hello everyone, I have this script and have a little problem. well, 2 actually. the first is that instead of echoing the whole quote, it only echoes the first letter. and it does'nt pick a random quote, just the last database entry.
this is the code:
$db_name = "$mysql_database";
$linkid = mysql_connect("$mysql_host", "$mysql_username", "$mysql_password");
mysql_select_db($db_name, $linkid);
$query = mysql_query("SELECT quote FROM phpd_quotes", $linkid);
while ($row = mysql_fetch_array($query)) {
$array = $row['quote'];
}
mysql_close($linkid);
$random_quote = $array['rand(0, count($array)'];
echo "$random_quote";
any help to correct this would be great.
thanx