random gallery

Started on the old forum in March 2010 · view the original in the archive · old links redirect here

2 replies · 424 views · started 16 years ago · 1 min read

2 participants
adex3g Developer · 181 posts #1

echo "Random Gallery Items:"; $randomm = mysql_fetch_array(mysql_query("SELECT imageurl, uid FROM ibwf_usergallery WHERE sex='M' ORDER BY RAND() LIMIT 1")); echo "<img src="$randomm[0]" height="50" width="50" alt="$randomm[1]"/>"; echo " "; $nick = getnick_uid($randomm[1]); $urlnick = "$nick"; echo "by: $urlnick";

pls i want the above code to show both male and female gallery, it only showing male gallery. pls help @ALL

have connected with http://adexchat.com ? Fun up with http://forum.adexchat.com

sky2kv Junior · 30 posts #2

adex3g wrote: echo "Random Gallery Items:"; $randomm = mysql_fetch_array(mysql_query("SELECT imageurl, uid FROM ibwf_usergallery WHERE sex='M' ORDER BY RAND() LIMIT 1")); echo "<img src="$randomm[0]" height="50" width="50" alt="$randomm[1]"/>"; echo " "; $nick = getnick_uid($randomm[1]); $urlnick = "$nick"; echo "by: $urlnick";

pls i want the above code to show both male and female gallery, it only showing male gallery. pls help @ALL

$random = mysql_fetch_array(mysql_query("SELECT url, uid FROM table_gallery ORDER BY RAND() LIMIT 1")); echo "<img src="$random[0]" alt="$random[1]"/>"; echo " "; $nick = getnick_uid($rnd[1]); $urlnick = "<a href="index.php?action=viewuser&sid=$sid&who=$rnd[1]"/>$nick</a>"; echo "by: $urlnick"; echo "

"; /////////////////////////////////////////////////////////////// for width and height echo "<img src="$random[0]" width="#" height="#" alt="$random[1]"/>";

Read through the forums..the codings all here.

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