danIT Posted November 26, 2008 Posted November 26, 2008 Heres what im looking to do: On a certain date reference one css.file but after that date forget about it. On December 1st display december.css but on 1st January display regular.css Any ideas? Could be PHP aswell?
Lithium Posted November 26, 2008 Posted November 26, 2008 (edited) in PHP you can just use the date() function to look up that... I think Javascript has a similar function and would work in a similar. I haven't done anything with PHP or Javascript so I'm useless to you beyond that I think you can echo ''; for PHP and a document.write() in JS... oce you've checked the date... $date = date("dmy"); if( $date = "011208" ){ echo ''; } else { echo ''; } ?> Edited November 26, 2008 by Lithium suddenly learnt php 1
mrcrazy04 Posted November 26, 2008 Posted November 26, 2008 (edited) In ASP you could use <% if date < #01/01/2009# then response.write "" else response.write "" end if %> And you can just place that where you would normally have your CSS reference. In PHP it would be if (date(m)=="12") { echo ""; } else { echo ""; } ?> Edit: Beat me to it Lithium! And yes, a document.write should work in the javascript, which shouldn't be too far off the PHP Edited November 26, 2008 by mrcrazy04 Fixed PHP 1
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now