Random article

Started on the old forum in September 2009 · view the original in the archive · old links redirect here

4 replies · 575 views · started 17 years ago · 1 min read

3 participants
robzky Developer · 205 posts #1

Can you code this for me? Thanks..

LESS TALK. LESS MISTAKE.

HTTP://APPSROB.COM - LIST OF MY FACEBOOK APPS!

arnage Lead · 811 posts #2

U think this?

// 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***
kiLLeR-eyEd_14 Senior · 382 posts #3

robzky wrote: Can you code this for me? Thanks..

yeh..it's very simple..lyk what wapmetal said..

$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>";

this is just an example..edit it accdg. to your script..

kiLLeR-eyEd_14 Senior · 382 posts #4

robzky wrote: All users here starts from noob.. Ü anyway, how to reset all plusses of all members?

a noob is different from a newbie..a newbie is one that just started while a noob is nothing more a newbie but still weak..hehe..tama ga ako?

mysql_query("UPDATE ibwf_users SET plusses='0'");
or try this
mysql_query("UPDATE ibwf_users SET plusses='0' WHERE id>0");
robzky Developer · 205 posts #5

I found a PHP Editor using mobile.. MOBILE PHP EDITOR (MPE) you can download at getjar.com...

LESS TALK. LESS MISTAKE.

HTTP://APPSROB.COM - LIST OF MY FACEBOOK APPS!

Sign in to reply.

Similar topics

Keyboard shortcuts

g f
Go to forums
g h
Go to your feed
g m
Go to messages
r
Reply (in a topic)
/
Search
j
Next post
k
Previous post
?
This list
Ctrl/⌘ + Enter
Send what you are writing
Ctrl/⌘ + B / I
Bold / italic while writing
Esc
Close