Ive got the basic SQL statement on my page.
$getimages = mysql_query(“SELECT * FROM
**** ORDER BY RAND() LIMIT 12”) or die(mysql_error());
//loops there name out
while ($image = mysql_fetch_array($getimages))
Right, Ive got some buttons at the top of the page which say ‘Most Recent’ , ‘Oldest’ , ‘Random’.
Basically, i want it to do what each button says when it is clicked. I know to get the newest ID is replacing RAND() by DESC, and the oldest by ASC. But how do i do this by just clicking a button?
Totally baffled. Anyhelp is appreciated.