IM A NOOB!
Moderator: General Moderators
-
alex_cunningham
- Forum Newbie
- Posts: 13
- Joined: Tue Jun 24, 2008 6:34 pm
IM A NOOB!
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
- RobertGonzalez
- Site Administrator
- Posts: 14293
- Joined: Tue Sep 09, 2003 6:04 pm
- Location: Fremont, CA, USA
Re: IM A NOOB!
You are going to have to be way more informational that that, I'm afraid.
-
alex_cunningham
- Forum Newbie
- Posts: 13
- Joined: Tue Jun 24, 2008 6:34 pm
yah your right
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
-
alex_cunningham
- Forum Newbie
- Posts: 13
- Joined: Tue Jun 24, 2008 6:34 pm
Re: IM A NOOB!
do u get it now
- RobertGonzalez
- Site Administrator
- Posts: 14293
- Joined: Tue Sep 09, 2003 6:04 pm
- Location: Fremont, CA, USA
Re: IM A NOOB!
When you say sites that in the folder its in, what do you mean?
-
alex_cunningham
- Forum Newbie
- Posts: 13
- Joined: Tue Jun 24, 2008 6:34 pm
Re: IM A NOOB!
it will randomly open a site in a web folder
Re: IM A NOOB!
oh .. the random sites in the web folder trick. I get it
maybe you should try rewording what you mean? what is a web folder? and what is a site in your dictionary?
maybe you should try rewording what you mean? what is a web folder? and what is a site in your dictionary?
- RobertGonzalez
- Site Administrator
- Posts: 14293
- Joined: Tue Sep 09, 2003 6:04 pm
- Location: Fremont, CA, USA
Re: IM A NOOB!
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.
-
alex_cunningham
- Forum Newbie
- Posts: 13
- Joined: Tue Jun 24, 2008 6:34 pm
Re: IM A NOOB!
sory i keep going away from my computer
-
alex_cunningham
- Forum Newbie
- Posts: 13
- Joined: Tue Jun 24, 2008 6:34 pm
Re: IM A NOOB!
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
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
-
alex_cunningham
- Forum Newbie
- Posts: 13
- Joined: Tue Jun 24, 2008 6:34 pm
Re: IM A NOOB!
get it yet pytrin
Re: IM A NOOB!
Code: Select all
<?php
$pages = glob('./*.html');
include $pages[rand(0, count($pages))];
?>-
alex_cunningham
- Forum Newbie
- Posts: 13
- Joined: Tue Jun 24, 2008 6:34 pm
Re: IM A NOOB!
A
|
|
|
what do i do with this
|
|
|
what do i do with this
- John Cartwright
- Site Admin
- Posts: 11470
- Joined: Tue Dec 23, 2003 2:10 am
- Location: Toronto
- Contact:
Re: IM A NOOB!
Moved to PHP-Code.