connectDB(); $query = "INSERT INTO RandomQuotes(user_id, quote) ". "SELECT $currentUserID, '$newQuote';"; $database->queryDB($query); $database->closeDB(); } ?> connectDB(); $query = "DELETE FROM RandomQuotes WHERE unique_id = $quoteId;"; $database->queryDB($query); $database->closeDB(); } ?> Random Facts
Random Quotes and Facts

connectDB(); /** SELECT Query **/ $query = "SELECT q.quote, u.username, u.unique_id, q.unique_id AS quote_id ". "FROM Users AS u, RandomQuotes AS q ". "WHERE u.unique_id = q.user_id ". "ORDER BY q.unique_id DESC;"; $result = $database->queryDB($query); /** Print Results **/ echo ''. ""; while($row = mysql_fetch_array($result,MYSQL_ASSOC)) { $currentQuote = $row["quote"]; $currentUsername = $row["username"]; $quoteId = $row["quote_id"]; if($currentUserID == $row["unique_id"]) { echo "". ''; } else { printf("",$currentQuote,$currentUsername); } }//while echo "
QuoteSubmitted By 
$currentQuote$currentUsername
%s%s 
"; /** Close Connection **/ $database->closeDB(); ?>