Page 1 of 2

IM A NOOB!

Posted: Tue Jun 24, 2008 6:40 pm
by alex_cunningham
I dont know what im doing but i need a php code that will bring up a diferent page every time you click on a button

Re: IM A NOOB!

Posted: Tue Jun 24, 2008 7:01 pm
by RobertGonzalez
You are going to have to be way more informational that that, I'm afraid.

yah your right

Posted: Tue Jun 24, 2008 7:21 pm
by alex_cunningham
well i want a code that it will randomly pick a site and open it but only the site's in the folder its in

Re: IM A NOOB!

Posted: Tue Jun 24, 2008 7:30 pm
by alex_cunningham
do u get it now

Re: IM A NOOB!

Posted: Tue Jun 24, 2008 7:33 pm
by RobertGonzalez
When you say sites that in the folder its in, what do you mean?

Re: IM A NOOB!

Posted: Tue Jun 24, 2008 7:34 pm
by alex_cunningham
it will randomly open a site in a web folder

Re: IM A NOOB!

Posted: Tue Jun 24, 2008 7:36 pm
by Eran
oh .. the random sites in the web folder trick. I get it 8O

maybe you should try rewording what you mean? what is a web folder? and what is a site in your dictionary?

Re: IM A NOOB!

Posted: Tue Jun 24, 2008 7:39 pm
by RobertGonzalez
So do you have a file with sites listed in it that is living in a directory? Or is there a file for each site that is living in a directory? I'm sorry, but I am having a heck of a time understanding what you are asking.

Re: IM A NOOB!

Posted: Tue Jun 24, 2008 8:07 pm
by alex_cunningham
yah

Re: IM A NOOB!

Posted: Tue Jun 24, 2008 8:08 pm
by alex_cunningham
sory i keep going away from my computer

Re: IM A NOOB!

Posted: Tue Jun 24, 2008 8:25 pm
by alex_cunningham
ok like this i find this site o look this button says random site i click on it. it takes me to a site
i click on it again hey look its a different site i try it on my friends computer hey its still a different site its not the same as the one on my computer

Re: IM A NOOB!

Posted: Tue Jun 24, 2008 8:32 pm
by alex_cunningham
get it yet pytrin

Re: IM A NOOB!

Posted: Tue Jun 24, 2008 9:03 pm
by Jenk

Code: Select all

<?php
$pages = glob('./*.html');
include $pages[rand(0, count($pages))];
?>

Re: IM A NOOB!

Posted: Tue Jun 24, 2008 11:13 pm
by alex_cunningham
A
|
|
|


what do i do with this

Re: IM A NOOB!

Posted: Tue Jun 24, 2008 11:21 pm
by John Cartwright
Moved to PHP-Code.