Jump to content

Recommended Posts

Is there a way to display a differant page per month in <div id="contentarea"></div> I tried Monthly iframe content II from www.dynamicdrive.com, but it didnt work I believe the iframe thing is not working with the div I want it to display the pages in. Ive looked around the net but havent found anything that allows me to setup 12 pages i.e. Jan.htm or php, Feb.htm or php, March.htm or php........ and display the page according to month. Im using this to display a page now without having to click a link or anything.

<script type="text/javascript"> // Auto Loads Splash
ajaxpage('splash/mar.htm', 'contentarea')
</script>

Its part of anylinkcss

I cant seem to get a responce or help from dynamicdrive so I turn to you all for the answer.

 

edited had to add a 0 to the array key to match the dates so sorry....

what wrong doing it this way?

<?php

$date=date("m");

$array=array("01"=>"redarrow","02"=>"php","03"=>"myslq","04"=>"html","05"=>"css");

foreach($array as $key=>$val){

switch($date){

   case "$key":

		echo $val;

		break;
		 }
}
?>

 

or

 


<?php

$date=date("m");

$array=array("01"=>"spalsn_name1.php","02"=>"splach_name2.php","03"=>"spalsh_name3.php","04"=>"splash_name4.php","05"=>"splash_name5.php");

foreach($array as $key=>$val){

switch($date){

   case "$key":

		$value=file_get_contents("http://www.what_ever.com/$value");

		echo $value;

		break;
		 }
}
?>

 

 


I dont unstand what your telling me do I substut what you have there for what I do for the link or do I write a php file with your code in it and refer my current link ajaxpage('splash/php with your code in it, 'contentarea')

 

it a php example to change information monthly.

 

Use a array, and date function, and a switch, to get the result every month.

 

don't no nothing about ajax or your design set up, just a simple example to play with.

 

it might help it might not sorry.

 

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.