Jump to content

Help with grabbing random on refresh


Tunacha

Recommended Posts

Well what im trying to do is grab a random page title on refresh of the page, and so far what i have is

 

   public function getTitle()
    {
        $rset = $this->mysql->select('slogan',"titles","","RAND()","1");
        while ($r=mysql_fetch_array($rset)){
            echo $r['slogan'];            
        }
    }

 

But i cant figure out why it isnt grabbing a random value oin page refresh, it just keeps grabbing the same one, could anyone explain what im doing wrong?

Link to comment
https://forums.phpfreaks.com/topic/214573-help-with-grabbing-random-on-refresh/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.