16: Exercise Using PHP | Scheduled Message Programming | PHP Tutorial | Learn PHP Programming

Exercise Using PHP | Scheduled Message Programming | PHP Tutorial | Learn PHP Programming. In this PHP tutorial you will do a short exercise where we use some of the knowledge we have gathered from previous episodes. The primary reason behind this exercise, is to show how we can use what we have learned so far, to build an actual PHP application on our website.

w3schools date parameters:
http://www.w3schools.com/php/func_date_date.asp

➤ GET ACCESS TO MY LESSON MATERIAL HERE!

First of all, thank you for all the support you have given me!

I am really glad to have such an awesome community on my channel. It motivates me to continue creating and uploading content! So thank you!

I am now using Patreon to share improved and updated lesson material, and for a small fee you can access all the material. I have worked hard, and done my best to help you understand what I teach.

I hope you will find it helpful :)

Material for this lesson: https://www.patreon.com/posts/php-16-download-15610162

Comments

BrotherSaed Ahmed says:

Thanks Dude , I have actually watching all your video , Thanks for sharing this to the other people around the globe, actually i did not any knowledg about Php i am now confident Thanks again and again , hello from Somalia

Ervin McMillan says:

You make a good teacher. I understood this right off the bat.

Kevin DeLaune says:

Still following and loving your PHP courses! Any chance you could create a tutorial on how to build an up-to-date website, with a login system and a members area? I cannot find ANYTHING online that is up-to-date on how to do this with PHP.

Joy Bhalla says:

I have a doubt,we could’ve used if else statements to determine the day,for example if $dayofweek == 5 or 6,i’m not saying this method is wrong,i just want to know why we did not use the alternative.

Caged says:

$dayofweek = date(‘l’);
“Today is $dayofweek”;

zed 0 says:

Haha same here, it’s Friday

Esmail EL BoB says:

its local time or server time ?

Frank Pacheco says:

Even though today(7/16/18) is Monday, the date() function states that it is Tuesday. Any thoughts as to why? Does it have anything to do with GMT? I live on the East Coast of the US.

sharifa bahar says:

Thanks many many thanks . Excellent as usual . I have a question . May you help me why my css style does not work ?

css code :

p{

text-align:center;
font-size: 120px;
font-family: Arial;
margin-top:38vh;
}

php code :

< !DOCTYPE html>



Calculator Page

< ?php $dofw=date("l"); echo $dofw; switch($dofw) { case 1: echo "It is Monday"; break; case 2: echo "It is Tuesday"; break; case 3: echo "It is Wednesday"; break; case 4: echo "It is Thursday"; break; case 5: echo "It is Friday"; break; case 6: echo "

It is Saturday“;
break;

case 0:
echo “It is Sanday”;
break;

}


MoVine says:

Im back this my 2nd day

Akpeghughu Andrew says:

use < ?php $date = date("N"); //it do count from 1 instead "w" parameter that count from 0;?>

Badal Naftaada says:

Notice: Undefined variable: dayofweek in C:xampphtdocscasharadaindex.PHP on line 19

Notice: Undefined variable: dayofweek in C:xampphtdocscasharadaindex.PHP on line 24

Notice: Undefined variable: dayofweek in C:xampphtdocscasharadaindex.PHP on line 28

Notice: Undefined variable: dayofweek in C:xampphtdocscasharadaindex.PHP on line 32

Notice: Undefined variable: dayofweek in C:xampphtdocscasharadaindex.PHP on line 36

Notice: Undefined variable: dayofweek in C:xampphtdocscasharadaindex.PHP on line 40

Notice: Undefined variable: dayofweek in C:xampphtdocscasharadaindex.PHP on line 44
it is sunday!

when i run this errors are coming how can i solve… reply me please if you can..

anthony aniah says:

very interesting introduction to basic calculator in php. But how can I use this idea to calculate taxation values in Laravel?. Need Your guide please. Thanks in advance

ScreenPrintR says:

Actually forgot that you mention it was Friday. So I added the Page tags

to Friday, and not Monday of which it is today. After adding the P tag to each day it worked as yours does.

Slow Easy English says:

Hey mmtuts (sorry, I don’t think you say your name in any of the vids I’ve seen LOL).

First of all, I wanna say how excellent your tutorials are. I’ve only watched the PHP ones so I can’t speak for the others, but these are amazing. You know how many “tutorials” out there fail to explain things properly? 99%. Yes, 99%. You know how many fail to actually show you HOW do to things? 99%. Yes, 99%. You know how many fail to show you HOW to do things && explain them well? Yup. You are in the 1% of the 1%. It’s such a shame you’re not getting more views on these. With the quality of your presentation, I expected to see views of 50k+. Keep at it, man. Word will get out and they will pay off eventually. There is a serious shortage of quality instructors on the net so it’s only a matter of time.

After all that, I do have a question. LOL

When I did this, I got “5” for Friday. But it’s Thursday. So I tried “d” and I got “02”, but it’s December 1st, not 2nd. My first thought was that maybe my server is in a different time zone. Oh no, I’m using localhost on WAMP. lol. Could my VPN be responsible? Shouldn’t. I’m connected to New York right now and it’s the same time there as here. Check system time and date and it’s all accurate.

So what could be causing the date(“w”) function to be returning the wrong result?

Laxman Giri says:

Please upload on ubuntu OS too…U are very good teacher

Victor Rodriguez says:

it would have being better to use an array insted. Like this:

$weekday = array(“Sunday”, “Monday”, “Tuesday”, “Wednesday”, “Thursday”, “Friday”, “Saturday” );
$dayofweek = date(“w”);

echo “Today is “.$weekday[$dayofweek];

ogün Kara says:

I’m definitely sharing these with everyone man, kudos to you

Aybars Öztürk says:

man u are god

ta22stcoupe says:

Very unnecessary way of figuring day of the week out. The date function has that already built in. Just do: < ?php echo date('l');?>
Done.

Will the says:

In atom opened new .less stylesheet is that ok or how do i make a .css one?

Jeroen Koorenhof says:

Thanks for this. Now having this running WITH a background :). I’m currently following the whole course. Although i’m familiar with the basics, there might be something i didn’t know!

Keep going with this. It’s very n00b friendly and i’m enjoying this content.

Enis Gusinac says:

ITs Friday for me too !! 😀

Jacky Wong says:

i think may be use array to do this is better

Joan Ricart says:

It’s Tuesday!

sharifa bahar says:

Thank you . Your video make me to be alive with my job. I have a question that What did you use for style is it java script or css ?

G V says:

If there are more than one files in phptutorials (as in yours) then how can it work??

demian says:

You can just do:
< ?php echo "

This is “.date(‘l’).”“;

SANJU VERMA says:

Sir , i write every single code as it is yours , but i got blank screen , dint get any text as my answer, i hope you will solve my problem…

Amber Adams says:

You are EXCELLENT!!!!!

I’m learning so much in a short amount of time.

Ahmedinho Dasilva says:

hy you are my hero I deeply appreciate your awesome videos… thanks A lot.

Markos V says:

It’s Friday for me too! Lucky?

Write a comment

*

Human Verification: In order to verify that you are a human and not a spam bot, please enter the answer into the following box below based on the instructions contained in the graphic.


Do you like our videos?
Do you want to see more like that?

Please click below to support us on Facebook!

Send this to a friend

▷ Other ReviewsVehicles▷ Show Cars▷ Motorbikes▷ Scooters▷ Bicycles▷ Rims & Tires▷ Luxury BoatsFashion▷ Sunglasses▷ Luxury Watches▷ Luxury Purses▷ Jeans Wear▷ High Heels▷ Kinis Swimwear▷ Perfumes▷ Jewellery▷ Cosmetics▷ Shaving Helpers▷ Fashion HatsFooding▷ Chef Club▷ Fooding Helpers▷ Coktails & LiquorsSports▷ Sport Shoes▷ Fitness & Detox▷ Golf Gear▷ Racquets▷ Hiking & Trek Gear▷ Diving Equipment▷ Ski Gear▷ Snowboards▷ Surf Boards▷ Rollers & SkatesEntertainment▷ DIY Guides▷ Zik Instruments▷ Published Books▷ Music Albums▷ Cine Movies▷ Trading Helpers▷ Make Money▷ Fishing Equipment▷ Paintball Supplies▷ Trading Card Games▷ Telescopes▷ Knives▷ VapesHigh Tech▷ Flat Screens▷ Tech Devices▷ Camera Lenses▷ Audio HiFi▷ Printers▷ USB Devices▷ PC Hardware▷ Network Gear▷ Cloud Servers▷ Software Helpers▷ Programmer Helpers▷ Mobile Apps▷ Hearing AidsHome▷ Home Furniture▷ Home Appliances▷ Tools Workshop▷ Beddings▷ Floor Layings▷ Barbecues▷ Aquarium Gear▷ Safe Boxes▷ Office Supplies▷ Security Locks▷ Cleaning ProductsKids▷ Baby Strollers▷ Child Car Seats▷ Remote ControlledTravel▷ Luggages & Bags▷ Airlines Seats▷ Hotel Rooms▷ Fun Trips▷ Cruise Ships▷ Mexico Tours