Belleanme Posted January 25, 2009 Share Posted January 25, 2009 Hi guys, if this is only for pros then you're gonna kick me out of here. I just came from a CSS site asking them this question and was informed that this was PHP..so that's how dumb I am. :-\ I design websites, flash websites and some Dreamweaver and Wordpress stuff. someone asked me to do some basic updates on their website, and the site is done in CSS...and PHP... For the moment, the main question is this: There is a document which is called "rotating.specials", in there, the script tells it to show a different special each day. She wanted this removed. The date is part of this script. She wants the date to stay. So! Here is the current script: <?php $today= date("l"); //echo $today; switch ($today) { case "Monday" : echo $today . "'s Special" . '<font color="#FF9933"> 25% off </font> Services<br> Senior Citizens & College Students'; break; case "Tuesday" : echo $today . "'s Special" .'<font color="#FF9933"> 20% off </font> Services<br> Restraunt & Grocery Employees'; break; case "Wednesday" : echo $today . "'s Special" .'<font color="FF9933"> 20% off </font> Services <br>Police & Fire Dept. Employees'; break; case "Thursday" : echo $today . "'s Special" .'<font color="FF9933"> 20% off </font> Services<br>Hospital & Medical Employees'; break; case "Friday" : echo $today . "'s Special" .'<font color="FF9933"> 20% off </font> Services<br> City & County Employees'; break; default : echo 'Militay Special <font color="#FF9933">25% off</font> Services<br> every Monday - Friday! '; break; } ?> Can you please tell me how to modify this to only show the current date? I appreciate your help very much! Thanks! Quote Link to comment https://forums.phpfreaks.com/topic/142312-h-e-l-p-pleez/ Share on other sites More sharing options...
9three Posted January 25, 2009 Share Posted January 25, 2009 The function date("l") shows the current day. Do you mean the day? or date? If its date, check out the php manual it has the different formats that you can display it. When you change the date function you are going to have to edit each case to match the new defined date function. http://www.php.net/manual/en/function.date.php Quote Link to comment https://forums.phpfreaks.com/topic/142312-h-e-l-p-pleez/#findComment-745687 Share on other sites More sharing options...
shlumph Posted January 25, 2009 Share Posted January 25, 2009 Yeah sure what the hell. <?php $today= date("F jS, Y"); echo $today; ?> Quote Link to comment https://forums.phpfreaks.com/topic/142312-h-e-l-p-pleez/#findComment-745691 Share on other sites More sharing options...
Belleanme Posted January 26, 2009 Author Share Posted January 26, 2009 Thank you guys SO much! I'll look at this and try it out and let you know how it goes! Quote Link to comment https://forums.phpfreaks.com/topic/142312-h-e-l-p-pleez/#findComment-746155 Share on other sites More sharing options...
shlumph Posted January 26, 2009 Share Posted January 26, 2009 You're welcome broseph. Quote Link to comment https://forums.phpfreaks.com/topic/142312-h-e-l-p-pleez/#findComment-746308 Share on other sites More sharing options...
cooldude832 Posted January 26, 2009 Share Posted January 26, 2009 Quote Thank you guys SO much! I'll look at this and try it out and let you know how it goes! Please keep your copying paste out of the forums. ppl here are here to help people who appreciate php and don't just copy and paste. You don't even know the technologies your site is built in (Fyi CSS isn't even a technology its css first off and its a styling language not a functional or markup language like xHTML JavaScript PHP or ASP) You are the kind of people that give legit web designers a bad rep Quote Link to comment https://forums.phpfreaks.com/topic/142312-h-e-l-p-pleez/#findComment-746313 Share on other sites More sharing options...
haku Posted January 26, 2009 Share Posted January 26, 2009 Here's some help: Please is spelled p-l-e-a-s-e, not p-l-e-e-z. Quote Link to comment https://forums.phpfreaks.com/topic/142312-h-e-l-p-pleez/#findComment-746330 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.