bellow you can see my table. In this table we have 300 quotes that I'm trying to fetch my at random and display it on the page but I have not succeeded. The column containing the texts has the name "fortune_text". here is my attempt code:
<?php
$username = "fortunes";
$password = "xxxx";
$hostname = "localhost";
//connection to the database
$dbhandle = mysql_connect($hostname, $username, $password)
// connect to database
mysql_select_db("fortunes");
// query the databse
$query = mysql_query("SELECT 'fortune_text' FROM 'fortunes' ORDER BY RAND()");
echo "$query";
?>