| Welcome to CmdrTaco's Amazing Everything WanderMeister. This shows
a random path, 10 nodes from where you just came from. It's fun for
the whole family. Show your friends and neighbors. Alert the media. Or just try it out. Whatever. Oh, and I. know it gets stuck in loops.
Deal with it... I'll write something better asap.
%
print "Last Node:$FORM{lastnode}";
my ($jaunts,$first)=(10,$FORM{lastnode});
my $last=$first;
while($jaunts-- > 0) {
print " ".linkurl($las.t,$sid,$first);
my $c=$dbh->prepare("SELECT fromnode FROM nodes,links
WHERE tonode='$last'
AND fromnode=nodetitle");
$c->execute();
my @links=("");
while(my($last)=$c->fetch.row()) { push @links,$last; }
$last=$links[rand(@links);
$c->finish();
}
1;
%]
|