2: Basic Syntax In PHP | Procedural PHP Tutorial For Beginners | PHP Tutorial | mmtuts

Поделиться
HTML-код
  • Опубликовано: 14 авг 2024
  • In this PHP tutorial lesson I will teach about basic syntax when it comes to writing PHP code. Syntax is important for a number of reasons, especially when starting out since you should make a habit of not creating error messages for yourself.
    ➤ 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: / lesson-material-42361704

Комментарии • 123

  • @Dani_Krossing
    @Dani_Krossing  4 года назад +12

    Again just to mention it since there are new Patrons in here who didn't see the first PHP video.
    For my Patrons I just want to mention that the first 7 or so videos in this course, were recorded and edited long time ago. So the Patron supporters at the end of the first 7 videos doesn't match with my current supporters. But I will have you all included in the newer videos :)
    Thank you everyone! Stay safe.

  • @davescorneroftheworld1147
    @davescorneroftheworld1147 4 года назад +55

    You my friend, are a GREAT instructor. You must have spent a lot of time editing this video with the text editor in the back ground doing what you are talking about. Again, this is PERFECT timing. GREAT content. GREAT instructor.

  • @francia1927
    @francia1927 2 года назад +7

    Dani, your teaching ability and interaction with the students/public is awesome. This is by far the most clear, concise, and efficient instruction method I have seen. Thank you.

  • @user-cy3kn7zx1l
    @user-cy3kn7zx1l 3 года назад +8

    This is one of the coolest teaching format I've experienced. It's really engaging when you see both the instructor and text editor at the same time

  • @scottstevens5056
    @scottstevens5056 3 года назад +1

    Everything about these tutorials is spot on. I’ve just graduated a 4-year degree in Comp Sci and this dude was better than all of my lecturers (and most of them were absolutely fantastic)

  • @baibaapkalna3318
    @baibaapkalna3318 3 года назад +7

    This is just what I was looking for! Step by step, clearly explained.

  • @bernardtangum3629
    @bernardtangum3629 3 года назад

    You my friend is not just easy on my eyes, but also great communicator and educator. I am currently doing my Postgraduate in Data Science at the top university in Malaysia (University Malaya) and me being a typical Chinese, am hoping to get something out of my progra. Am in the midst of launching my e-commerce website and although I am comfortable with the data science portion, I had to learn from scratch how to build my websire. Thanks and BRAVO

  • @aditidas9693
    @aditidas9693 3 года назад +3

    Thank you so much for the perfect tutorials. The way you present and teach, the body language and voice mods, it is just perfect. You make learning so much more interesting.

  • @brina_larson
    @brina_larson 3 года назад

    Way better than the book our class has to read. You can't follow it at all. Thank you so much for your video.

  • @sumedhshrinath8491
    @sumedhshrinath8491 4 года назад +5

    oh my god, I love this! literally just waiting for the next parts to come, great presentation, and simplification!

  • @figgy6728
    @figgy6728 4 года назад +3

    Hey just dropped here to let you know htat youre doing a great job! Keep it up!
    Just began the HTML and CSS playlist.
    Keep uploading

  • @fatimahmath4819
    @fatimahmath4819 Год назад

    ur such as amazing person i can see how much patient and love to teach us u have in your body language

  • @markfrancismacaraeg7994
    @markfrancismacaraeg7994 2 года назад

    Thanks for your video, Your lesson is exactly what I need. My prof always saying his program was just a copy and didn't even explain any fundamentals needed in php or any reserve words in php. Here I am copying codes in php without understanding how tf did that happen or how tf did that work. hahaha

  • @snipercat7838
    @snipercat7838 Год назад

    It seems like such a daunting task and such a big thing to learn, but you explaining it makes it so much easier. Thanks!

  • @connief2679
    @connief2679 3 года назад +1

    Thank you for this excellent video series. One suggestions: please discuss the text editor when you teach setting up the server. Only learned about one text editor when I learned HTML. I would like to learn more.

  • @dinbackupsbashiro6963
    @dinbackupsbashiro6963 3 года назад +1

    The tutorial is very useful and at a good pace. It would have been even better if you showed the new bee the way to download and install Atom since this is a course from scratch

  • @ostips5216
    @ostips5216 Год назад

    This PHP videos coming in clutch right now, that I need to learn it for high school :D. Great vids!

  • @EmihleBooi-yu9zj
    @EmihleBooi-yu9zj 3 месяца назад +2

    You’re just too good bro✨🤚🏾

    • @Dani_Krossing
      @Dani_Krossing  3 месяца назад

      Thanks 🙂 btw I have a better and more updated 2023 course on my channel

    • @EmihleBooi-yu9zj
      @EmihleBooi-yu9zj 2 месяца назад

      @@Dani_Krossing could you please share the link🥰

  • @mykolazhabko3228
    @mykolazhabko3228 3 года назад +1

    Thanks man! So easygoing tutorial! Glad that i found you

  • @kk4268
    @kk4268 3 года назад +3

    Yo, can you please explain the part at 1:17. How did you open that option to change the file to .php?

  • @ilenvantev6170
    @ilenvantev6170 4 года назад +1

    My god! This reminds me of my C# days.Lovely!

  • @yousifky
    @yousifky 4 года назад +1

    Man ur awesome

  • @morenokv
    @morenokv 4 года назад

    Whoa, when I saw your name in my feed I had to double check. Welcome back!!

  • @phillipdonnelly6430
    @phillipdonnelly6430 Год назад

    Cool! Think about PHP as one thing and HTML as another. The PHP is prosesed on the Web Server and the HTML is read on the Client end the browser so they are seperate until the code reaches the browser when the HTML is read. So a PHP error comes from the server and is output as HTML and does not include the original pages HTML if the PHP section can't be read but may b output with an error if the PHP is within an HTML page such as I think that's how I see it.

  • @AmiDrutman
    @AmiDrutman 4 года назад

    Your videos are GREAT! Thank you!

  • @zilpahnamutali9355
    @zilpahnamutali9355 2 года назад +1

    thank you

  • @cb_sp5022
    @cb_sp5022 4 года назад +4

    Congratulacons with the 250T subs

  • @dirantechie9411
    @dirantechie9411 4 года назад

    Welcome back sir you are really great

  • @clintanthonynueva9741
    @clintanthonynueva9741 3 года назад

    Nice tutorial sir.

  • @tuyishemezeirispascal8461
    @tuyishemezeirispascal8461 3 года назад

    i needed this. very well explained

  • @nekabsmail6622
    @nekabsmail6622 4 года назад

    Welcom back 🤩🤩🤩

  • @AugustoAlcaraz1
    @AugustoAlcaraz1 2 года назад

    Where is the output of your video tutorial to show that your code is being run?

  • @robdaniels7841
    @robdaniels7841 2 года назад

    best channel

  • @matjan9656
    @matjan9656 3 года назад +5

    Is this guy the younger brother of Elon Musk ..?..:D

  • @alessiodurzo5464
    @alessiodurzo5464 4 года назад

    Can't wait to see how to connect a web-page to a database, keep it up bro!!!

    • @kvazaios5026
      @kvazaios5026 4 года назад

      He has done another php tutorial series, you know that right? You can check there I learned A LOT from it

  • @ShawnRitch
    @ShawnRitch 4 года назад

    I really like the way you have set up your lessons now. The way you are explaining things in the foreground and coding in the background - very nice. Your English is getting MUCH better as well. Thank you for all your hard hard work. Been watching your tuts for years. Hope you continue to create these well made tutorials 🙂

  • @leanneralphisales6177
    @leanneralphisales6177 2 года назад

    Great tutorial! :D

  • @elenajms7708
    @elenajms7708 2 года назад

    Thank you sooo much 💖💖💖😍😍😍😍

  • @elikemloh9896
    @elikemloh9896 4 года назад

    Am loving this.

  • @CSSuccessGamer
    @CSSuccessGamer 4 года назад

    hi im here to learn about php.

  • @BrightCode
    @BrightCode 4 года назад

    Please a quick question
    Is it possible to allow a certain number of users/items in your database table
    Eg if there are 10 current users data in the database and someone else registers, I want to remove the last user/item so that it will not be more than 10 users/items

  • @stefanpfadt4353
    @stefanpfadt4353 2 года назад

    Whoa!
    As a non-coder may I ask how you would go about this: I have a search form and want to hide specific form fields for users based on their normal Wordpress user role?

  • @inmobiliarialuty
    @inmobiliarialuty 4 года назад

    great job to starters that is priceless

  • @fardinfarnood41
    @fardinfarnood41 3 года назад

    Damn bro !!!
    You explained very well

  • @abdullahalras9617
    @abdullahalras9617 4 года назад +1

    Why did my html file stopped opening as a webpage since I changed it into .php? Now when ever I try opening it on chrome it shows what code I had on the text editor in the chrome.
    thanks btw for the amazing content. It is one of the best channels for learning coding..

  • @SnazzyNelson
    @SnazzyNelson 4 года назад +2

    I hope we will also see a laravel tutorial in the future since it's the most used framework for PHP.

    • @davescorneroftheworld1147
      @davescorneroftheworld1147 4 года назад

      Lets learn PHP FIRST and NOT some advanced something! I might be the most stupid man on the face of the earth but I THINK we can learn PHP without any FRAMEWORK. I have a GREAT idea, why don't you start a PHP tutorial and you can teach anything you want. I will watch mmtuts because I want to learn PHP and NOTHING ELSE (today) when I learn ONE THING then I will learn something else, that's the way my brain works.

    • @SnazzyNelson
      @SnazzyNelson 4 года назад

      @@davescorneroftheworld1147 I said it because mmuts already taught PHP and I learned a lot of PHP from mmtuts. I have even a greater idea. I think when you said 'advanced something', you have no idea what you are saying. Why don't you do some basic research about Laravel first? If you brain is too limited to do a search, here is the PHP playlist. It's still relevant today.
      ruclips.net/video/qVU3V0A05k8/видео.html

    • @SnazzyNelson
      @SnazzyNelson 4 года назад

      ​@@davescorneroftheworld1147 And by the way, you can learn php without any frameworks LOL. Frameworks are only learned once you master the language. You seems to have no idea of what you are saying.

    • @davescorneroftheworld1147
      @davescorneroftheworld1147 4 года назад

      @@SnazzyNelson I am laughing at you for getting bent out of shape. HAVE A GREAT DAY!!!!

    • @SnazzyNelson
      @SnazzyNelson 4 года назад

      @@davescorneroftheworld1147 I hope you stop laughing soon otherwise your brain cannot focus on the PHP course.

  • @SidAhmedHachoud
    @SidAhmedHachoud 3 года назад

    Despite the good teaching, Those tattoos look dope af !!

  • @ican8292
    @ican8292 4 года назад

    Thanks sir informative tutorial

  • @salehmubasher2194
    @salehmubasher2194 4 года назад +1

    can you make a video on how to make an automatically opening popup that opens when page is opened using javascrip0t

    • @gabrielfono844
      @gabrielfono844 3 года назад

      it is simple.
      try to figure this out.
      write a setTimeout function that will be called after few seconds it is easy.
      figure it out

  • @benjicanones1454
    @benjicanones1454 Год назад

    Thanks!

  • @sirface7951
    @sirface7951 4 года назад

    I love your vids! You are talking very well and understandful and you helped me
    So much with alot of things. But i have a small question. How can i change the color of the code? Because when i open HTML document the color of the elements are blue and i really want to change it to red cause it is more helpful

  • @gulshanmht
    @gulshanmht 4 года назад

    How to stop direct access to img src and other href links..Like uploaded profilepic...just show on profile page but prevent direct link access..

  • @shanikamadhushani9059
    @shanikamadhushani9059 2 года назад

    Please start a php framework course

  • @chow7052
    @chow7052 4 года назад

    Your videos are always great and very useful, I hope you can teach MySQL or Python, too

  • @haoyuli9656
    @haoyuli9656 4 года назад

    Hi, just curious what is the difference between this tutorial with the other playlist that you posted on 2015?

  • @lerysht844
    @lerysht844 4 года назад

    You're the G.O.A.T

  • @cjvaans4484
    @cjvaans4484 4 года назад

    Will you redo the PHP login system? Thanks for the videos.

  • @astroahad
    @astroahad 3 года назад

    Oh you have unity...❤️

  • @richardsilva5136
    @richardsilva5136 4 года назад

    Great, man!!

  • @billwebber5208
    @billwebber5208 3 года назад

    Love it!

  • @WeedoGaming
    @WeedoGaming 4 года назад

    Do html support external pho file?

  • @CyrusKhamak
    @CyrusKhamak 2 года назад +1

    very good teaching
    BUT
    so so so difficult to find the next related episode.

    • @Dani_Krossing
      @Dani_Krossing  2 года назад

      Just go to my playlist with all episodes in it. It's on my channel. 🙂

    • @CyrusKhamak
      @CyrusKhamak 2 года назад

      @@Dani_Krossing Hi
      Thank you for getting back to me
      I DID
      but wanted so much time as I could not find the playlist there and I am not a dummy :)
      You dod a good job with MVC section but not here man as looked and looked and spent so much time
      and
      finally could not find
      Cyrus

  • @ElliyahuRosha
    @ElliyahuRosha 4 года назад

    You really like exclamation marks ;)

  • @salmalakhlifi1901
    @salmalakhlifi1901 4 года назад

    Is it a new tutorial for PHP or are you gonna continue where you stopped in the previous PHP playlist?

  • @Anaskhan-px4lu
    @Anaskhan-px4lu 4 года назад

    sir please tell me how can we run code in browser i m facing difficulty there

  • @SayJee
    @SayJee 4 года назад

    How do you make this kind of tutorial? Do you made it only by yourself?

  • @GamerSolitO
    @GamerSolitO 3 года назад

    Love iiit!!!!

  • @baryjonas5714
    @baryjonas5714 4 года назад

    ohhhh great .... how to get this black theme ?

  • @trravelog-t5
    @trravelog-t5 4 года назад

    I posted it on the older video, thought will do it here so I might get a reply soon
    Hey Daniel, you have awesome courses, I got a very good understanding of OOPs from your video. I was trying something locally and not able to crack it, i know its simple but for some reason its not working.
    I have an index page and a class file. In class, i have defined it something like this
    Class ABS{
    private $var1
    private $var2
    private $var3
    public function function1(){
    Some SQL query which return an iD
    //from the array i get the below ID, and when i do an echo here it shows the id as well
    echo $ID = $this->var3 = ID['SrID'];
    }
    public function function2(){
    echo $ID; //doesnt work
    echo $this->var3 //doesnt work
    //basically trying another SQL here with the ID I get in function1//
    }
    so how can I get this variable from function1 to function2, I tried a lot but did not work, so for now what I did is, in the index file I got a return from function one and then I have passed that ID to function2 in index, something like below
    $classvalue = new ABS();
    $ID=$classvalue-> function1();
    echo $classvalue-> function2($ID);
    wondering if there is an easy way to it.

  • @djawitsolnsvlogs9568
    @djawitsolnsvlogs9568 4 года назад

    LOOOOOOOOVE THE SETUP great presentation
    thought i was d one teaching PHP7 in (tweny tweny)2020

  • @andy7567
    @andy7567 3 года назад

    I really really wished that you showed us the actual output. This is my first time seeing PHP code and while the video was great I did not see the result and if there is any visual difference in the output between PHP and HTML

    • @Dani_Krossing
      @Dani_Krossing  3 года назад

      This is only #2 in the course. You will get to see the output in the upcoming lessons :)

  • @CHMARKHELMEHDI
    @CHMARKHELMEHDI 3 года назад

    thank uuuu

  • @sherwalichd
    @sherwalichd 4 года назад

    You already have a PHP tutorial a few years back. Is this one different?

  • @rohanshah7960
    @rohanshah7960 4 года назад

    Can you please continue the MVC model amd make a bigger episode showing a litte more on MVC model?

    • @VitalijMik
      @VitalijMik 4 года назад

      Real MVC is not possible in the web since you need a process running whole time and an observer pattern based system. so what exists in the web is called "web-mvc" because it is running with a front controller pattern, but in many years of development Web-MVC considert not the best solution. instead there are different approaches, for example in laravel framework you have repositories and entities, which are essentially models but without a tight coupling to the database. and those are easier to code than a magic model which can "magically" access the database fields and retrieve data from it.

  • @ArmandoGonzalez-ux8yr
    @ArmandoGonzalez-ux8yr 4 года назад

    Are you planning to upload every day?

  • @rakshitarenja7123
    @rakshitarenja7123 4 года назад

    Hy
    I have a question
    When we signup on a website
    We feed all the details to create account
    Then in a second we receive mail from that website
    The mail asks to click on the link to verify your account
    As we click on the link
    The web page comes showing your account successfully created
    This is what my question is
    How to generate this automated transaction when the user creates the account and receive a mail
    This would be wonderful to get the answer from you Thankyou in advance 😁

    • @VitalijMik
      @VitalijMik 4 года назад

      Usually you have in your user Database Table a confirmation code saved. When you create a new account you generate this code and stores it into database and then you send a link via e-mail like yoursite.com/confirm.php?key=abc inside the confirm.php you then can ask $_GET key and compare it to the key in the database. if you find a user with the key, then set the key in the database to null.
      so then you know if the value in the database is empty this means the user is activated.

  • @redled1702
    @redled1702 3 года назад

    when i type localhost in chrome it dosent open the thing u get. it opens a website "Welome to XAMPP
    " please help me im abput to rage

  • @lekalili
    @lekalili 4 года назад

    Are you up to Laravel ?

  • @cypx5202
    @cypx5202 Год назад

    Elon musk part2:)

  • @naveenkr5992
    @naveenkr5992 4 года назад

    Ain't this same as the other PHP tutorials playlist?

  • @Impulse_Photography
    @Impulse_Photography 2 года назад

    Echo : Old DOS command .....

  • @unsy_0
    @unsy_0 4 года назад

    Ending song sounds better

  • @rezaulhaque5751
    @rezaulhaque5751 4 года назад

    We want oop php concept for live projects

  • @nehasakhare4480
    @nehasakhare4480 2 года назад

    Can you Run this code.....????

    • @Dani_Krossing
      @Dani_Krossing  2 года назад

      This is just a video of me explaining syntax 🙂 I will run the code in the next couple of videos where there is actually something to run.

  • @johndanielcepeda5393
    @johndanielcepeda5393 Год назад

    god bless u xdd

  • @chaostrader
    @chaostrader 4 года назад

    This video is not in the PHP playlist, just thought i'd let you know ;)

  • @gmchahan878
    @gmchahan878 3 года назад

    yeay

  • @olgala2023
    @olgala2023 Год назад

    😀

  • @pablofonseca8867
    @pablofonseca8867 4 года назад

    For the people that dislike this video, is everything fine at home?

  • @TheAngelOfDeath01
    @TheAngelOfDeath01 3 года назад

    Argh... now the perfectionist and the security-nerd is coming up inside of me... and I think you know what I am about to say about that "/htdocs/"-folder and placing your web-root there! 😎😜
    BUT, to all those out there who are trying to get into the whole business of programming in PHP. NEVER place your code - Development or Staging -- especially Production Code -- inside your www-root / web-root folder. In fact, never place anything beyond your index.php or default.php file in your www-root folder. What you should instead do is organizing so-called "header-files" that you include() into your index.php or default.php file that then in turn links to your Code Library such as Presentation Layer (css, html, JavaScript), Business Layer, Data Layer(database), and all that good stuff that my compatriot will get into later on. ;-)
    There are numerous of reasons for all this, but the most important ones being first and foremost security, but also versatility. Rather than, in this case, setting up the "/mywebsite/"-folder inside the "/htdocs/"-folder, you should take your time and read up on something called "Virtual Hosts".
    Now, Your Code Library (and again, this is part security, but it's also done for the sake of "re-usable code", meaning code that you can use for more than ONE web-application (say you have both and internet(Public Domain) and intranet(Private Domina) web-application like you would have if you were building a blog, a web-store, so on and so forth)) should reside far-away from any folder that involves XAMPP or XAMPP has access to.
    This is especially true of your Business Logic and Data Layer. Your Presentation Layer, since it holds (at least it shouldn't!) no Program Logic other than Flags and Switches (pieces of code you use to display various segments of your Presentation Layer), you can with relative safety place that in your www-root folder as well. But it does require keeping your Presentation Layer neatly clean!
    There is of course a heck of a lot more to be said than what I've mention here, but it is undoubtedly something you, as a programmer (newcomer, advanced, or senior) will benefit from if you're serious about PHP (and XAMPP). If you're on the school bench and are looking for a career working with programming, you will score good points by knowing all this right-of-the-bat.
    Now, go and code something amazing!

  • @juliozamudio571
    @juliozamudio571 3 года назад

    You are super cute in this video. :)

  • @alexsmith-rs6zq
    @alexsmith-rs6zq 4 года назад

    PHP | PRETTY HUGE PARENTHESIS

  • @fabianodias10044
    @fabianodias10044 4 года назад

    0:02 you said psp 😂

  • @khurram3955
    @khurram3955 4 года назад

    I donated $10 to your paypal a month ago and I got rejected?

    • @Dani_Krossing
      @Dani_Krossing  4 года назад

      If you mean the "Patron list" at the end of the video, I unfortunitaly recorded the first 7 videos in this PHP course a long time ago, so newer Patrons aren't shown here at the beginning :(

    • @khurram3955
      @khurram3955 4 года назад

      @@Dani_Krossing I watched one of your older vids and you linked your paypal, which I donated to (got refunded for some reason). It's fine I guess, I'll just toss a donation via patreon instead, cheers.

  • @ayor3829
    @ayor3829 3 года назад

    Why you say "psp"?

  • @kerrpepito7418
    @kerrpepito7418 3 года назад

    This is a comment.

  • @salmaanabdul1305
    @salmaanabdul1305 4 года назад

    Next time Need less talk and more action