|
|
||||||
|
||||||
| Index Link To US Private Messages Archive FAQ RSS | ||||||
| Graphics & Design Discussion Forum Post your graphics design questions/comments/ideas in here. Ask questions, post tutorials, discuss trends and best practices. Sub-forum for website accessibility and usability. |
Share Thread: & Tags
|
||||
|
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
|||
|
I would like to have my home page randomly rotate between a few different pages. I have items that go on sale and change prices all the time and would like to have different pages with different items and different sales, then to have those pages randomly display as the home page when ever someone goes to my website.
Is this possible? And if so how can I set this up? Thanks if I need to explain my self a little better please let me know. |
|
|||
|
Yes, it's possible. You'll need PHP or SSI or some other server side gunk to do it.
Here's how I'd do this in PHP: Code:
<?
//index.php
include('top.htm');
$pool_size = 4;
$pg_num = rand(1, $pool_size);
include("mid{$pg_num}.htm");
include('bottom.htm');
?>
But I doubt that is very good from a Google point of view. |
|
|||
|
Thanks for the quick reply, I have not worked at all with PHP or SSI and I am not exactly sure how to use that PHP code you gave me with my sites. I have been learning web designing on the fly so whenever I want to try something new with my sites I have to go and learn how to do it before I can try it.
So how would I go about using 3 pages forhttp://equickcomputing.com and then using your PHP code to get the pages to randomly display? Also Do you link that this would hurt me with google? Thanks again for all the help! |
|
|||
|
Take your page and divide it into three parts, the top part, the middle part that's going to change, and the bottom part.
Now create two more middle parts that are alternatives. Now name them mid1.htm, mid2.htm, mid3.htm Now take my code and put it into a file called index.php. Set $pool_size to 3. Now load the whole whizbang up to your site and watch the magic :). |
|
|||
|
Thanks HardCoded,
My pages are already divided into those sections so this should not be to hard to just create a few different pages and enter them into the code. Thanks again for everything and if something doesnt work I may have a few more questions. |
![]() |
|
| Thread Tools | |
| Display Modes | |
|
|
|
WebProWorld |
Advertise |
Contact Us |
About |
Forum Rules |
MVP's |
Archive |
Newsletter Archive |
Top |
WebProNews
WebProWorld is an iEntry, Inc. ® site - © 2009 All Rights Reserved Privacy Policy and Legal iEntry, Inc. 2549 Richmond Rd. Lexington KY, 40509 |