Can you code this for me? Thanks..
Random article
Collapse
X
-
U think this?
PHP Code:// Random text
$line[] = "Text1";
$line[] = "Text2";
$line[] = "Text3";
$line[] = "Text4";
$line[] = "Text5";
// Random links
$line["http://link1.tld"] = "Link1";
$line["http://link2.tld"] = "Link2";
$line["http://link3.tld"] = "Link3";
$line["http://link4.tld"] = "Link4";
$line["http://link5.tld"] = "Link5";
$num = count($line) - 1;
srand ((double) microtime() * 1000000);
$random = rand(0,$num);
$ranline = $line[$random];
//
echo '<p>'.$ranline.'</p>';
<!DOCTYPE html PUBLIC "-//WAPFORUM.RS
-
Originally posted by robzky View PostCan you code this for me? Thanks..
PHP Code:$article = mysql_fetch_array(mysql_query("SELECT id, name FROM articles ORDER by RAND() LIMIT 1"));
echo "<a href=\"articles.php?id=$article[0]\">$article[1]</a>";
My Blog: http://jhommark.blogspot.com
My Facebook: http://www.facebook.com/jhommark
My Official Site: http://www.undergroundweb.tk
My Community Site: http://undergroundwap.xtreemhost.com
Comment
-
Originally posted by robzkyAll users here starts from noob.. Ü anyway, how to reset all plusses of all members?
PHP Code:mysql_query("UPDATE ibwf_users SET plusses='0'");
or try this
mysql_query("UPDATE ibwf_users SET plusses='0' WHERE id>0");
My Blog: http://jhommark.blogspot.com
My Facebook: http://www.facebook.com/jhommark
My Official Site: http://www.undergroundweb.tk
My Community Site: http://undergroundwap.xtreemhost.com
Comment
Comment