Basic PHP Tutorial 1: Intro to PHP

sentdex · Beginner ·🛠️ AI Tools & Apps ·13y ago

Key Takeaways

Introduces the basics of PHP programming language

Full Transcript

hello and welcome to my basic PHP tutorials so what is PHP uh PHP originally stood for personal homepage and later it was kind of uh appended uh to the end of it hypertex processor so really PHP nowadays stands for a PHP hypertex processor um or phph HP but uh I guess they just didn't like the sound of that so anyway uh what's PHP used for PHP is really just a general purpose programming language though it's most notably used for web development um and really what it does is it's more of a server side scripting language and it's interpreted by C basically or or the server and so this means like whenever someone views your PHP page over the internet and they say go to like view Source um they're not seeing your PHP code they're just seeing the HTML output from your PHP code so um that's basically how it works and what its uses are and with that that kind of leads into the next part most PHP tutorials uh start off with the installation of xamp and Apache I don't really think that that makes very much sense if you're here to learn PHP to like maybe just run stuff on your computer then you've probably chosen the wrong language maybe check out python um or C or Java right but not PHP um now if you're going to run maybe your own like an unmanaged VPS or your own server you'll need to know how to install Apache and all that but chances are if you're watching a beginner's PHP tutorial that's not what you want to do so I'm going to assume that you have some sort of ability to host um files if you don't there are plenty of online hosting uh services that are free and then there's also plenty of online hosting that's really really cheap like most of the time I see on like GoDaddy you can buy a domain and internet hosting for like a dollar for a month so for and and really if you're if you're learning PHP I'm assuming that you eventually want to have a website so or at least understand the websites so the best way to do this is not you know to learn it on you know uh xamp and then once you get comfortable with doing xamp you're going to have to learn how to use okay get used to and comfortable with using some sort of FTP Service and then also um whatever your hosting is and if you've got like databases and you want to learn how to do stuff like you know interact with your database U manually and all this kind of stuff you've got to almost like you it's like a fundamental thing right how you edit a how you edit files and like test them and stuff like that like it's pretty fundamental um so if you learn on xamp and then you need to go go to like an actual website it just seems kind of silly to me to learn on there when the end goal is to be online so enough of that I'm going to be showing you guys I'm going to edit with um notepad++ you can edit strictly with just a notepad file if you want just um make the file extension. BHP but I highly suggest notepad++ um as its file name suggests it's an it's a an improvement over a regular notepad um and then also I'll be using file to upload the files I'll not really be showing you too much within filezilla but that's what I'll be using to upload files to my server um so anyway um but if you want you can use xamp you can do whatever the heck you want to do I'm just going to be going through the PHP Basics uh file if you do do the file Zilla rout that's what I suggest um you really just need to know once you download filezilla you'll need your host IP address you'll need your you know FTP username name the password and you can leave port empty and you just hit quick connect and that'll connect you to the root of uh your hosting plan basically or all your host files from there you can go into whatever directory you want to use um so and almost all of my tutorials will be single pages so you won't really need to even do that um it doesn't really matter where you're going to store them um you just should put them up there so you can test them yourself so with that I'm going to go ahead and hop right on into it and we ought to make at least a some sort of code on the first tutorial or I find it to be very depressing so what we will do is you start off a uh PHP script with uh PHP tags and those tags are question mark PHP and then you close off the tag with another question mark and everything in here is read as a PHP script and if it is not uh compliant with the proper syntax you'll get an error so uh let's do the first thing and the easiest thing let's just Echo out a statement and do not worry I'm not going to Echo hello world if you've ever learned any sort of programming language in your life you probably sick and tired of seeing hello world so instead we'll just Echo welcome to PHP and um if you're coming from python uh you'll probably for get the semicolons a lot I will forget semicolons a lot I prefer python that's what I do most of my programming in so I like to forget semicolons but um otherwise you know it's a string you got to close off the string simple stuff really so whenever you're done with it if you're using filezilla save it and then filezilla will say oh you changed a file and then you'll upload the file and then you'll come over to uh wherever your link is my link happens to be um my one of my websites H Kinsley decom I've got tutorial and then PHP tutorials. PHP and then this one just says welcome to PHP so it just spits it out on uh Ono our page so that's going to conclude the first tutorial if you haven't installed filezilla please do install filezilla if you don't understand what's going on with filezilla or notepad++ feel free to leave a comment I'll respond to it but really both of them are are pretty simple pretty easy to use um like I said with filezilla just just once you have a hosting plan in a domain um and you add that domain to your hosting plan you'll have you know some sort of IP address uh that responds to your domain you'll just connect to that you'll use your username password you'll enter that and then on um you should see kind of in the uh on the right hand side a big list of files or just one if you only have one user or a domain click on there and you can just make a directory or whatever you want to do and you can just easily click and drag files into there so you can make PHP tutorials. PHP click drag it into that folder and then you can actually visit that URL online the only thing I will just say is if you are um just kind of toying around whenever you're done toying around it's unless you know for sure that whatever you've coded is is safe like if you've got some sort of uh submit functionality or some sort of connection to databases stuff like that and you're just kind of toying around the best thing for you to do is go ahead and remove that file from the server while you're not doing anything if you're not certain it's a secure um file because you can kind of represent some risks by leaving uh connections open if you don't know what you're doing so um anyway with that um stay tuned to the next tutorial

Original Description

Link to the full playlist: http://www.youtube.com/playlist?list=PLQVvvaa0QuDcYpcjrNB43_iKqla5UeQw_ Sentdex.com Facebook.com/sentdex Twitter.com/sentdex The basics and intro to PHP
Sign in to unlock AI tutor explanation · ⚡30

Playlist

Uploads from sentdex · sentdex · 22 of 60

1 Matplotlib Python Tutorial Part 1: Basics and your first Graph!
Matplotlib Python Tutorial Part 1: Basics and your first Graph!
sentdex
2 Python Encryption Tutorial with PyCrypto
Python Encryption Tutorial with PyCrypto
sentdex
3 Python's Logging Function
Python's Logging Function
sentdex
4 wxPython Tutorials 1: Making Windows GUIs with Python : Installing + 1st window!
wxPython Tutorials 1: Making Windows GUIs with Python : Installing + 1st window!
sentdex
5 wxPython Tutorials 2: Making Windows GUIs with Python: Customizing Window Parameters
wxPython Tutorials 2: Making Windows GUIs with Python: Customizing Window Parameters
sentdex
6 wxPython Programming Tutorial 3: Menu Bar and Menu Button
wxPython Programming Tutorial 3: Menu Bar and Menu Button
sentdex
7 wxPython Programming Tutorial 4: Panels
wxPython Programming Tutorial 4: Panels
sentdex
8 wxPython Programming Tutorial 5: User Input Saved To Variables
wxPython Programming Tutorial 5: User Input Saved To Variables
sentdex
9 wxPython Programming Tutorial 6: Multiple Choice Input
wxPython Programming Tutorial 6: Multiple Choice Input
sentdex
10 wxPython Programming Tutorial 7: Adding Static Text and Colors
wxPython Programming Tutorial 7: Adding Static Text and Colors
sentdex
11 wxPython Programming Tutorial 8: Custom Button Images
wxPython Programming Tutorial 8: Custom Button Images
sentdex
12 wxPython Programming Tutorial 9: Tool Bar Items and Sub Menus!
wxPython Programming Tutorial 9: Tool Bar Items and Sub Menus!
sentdex
13 Basic PHP Tutorial 13: Multi-dimensional Array
Basic PHP Tutorial 13: Multi-dimensional Array
sentdex
14 Basic PHP Tutorial 15: Functions and Global Variables
Basic PHP Tutorial 15: Functions and Global Variables
sentdex
15 Basic PHP Tutorial 12: Associative Array
Basic PHP Tutorial 12: Associative Array
sentdex
16 Basic PHP Tutorial 14: Foreach loop
Basic PHP Tutorial 14: Foreach loop
sentdex
17 Basic PHP Tutorial 16: Include and Require
Basic PHP Tutorial 16: Include and Require
sentdex
18 Basic PHP Tutorial 7: Assignment, comparison and Logical operators
Basic PHP Tutorial 7: Assignment, comparison and Logical operators
sentdex
19 Basic PHP Tutorial 4: Variables and Comments
Basic PHP Tutorial 4: Variables and Comments
sentdex
20 Basic PHP Tutorial 11: Arrays part 1, basic array
Basic PHP Tutorial 11: Arrays part 1, basic array
sentdex
21 Basic PHP Tutorial 6: If else and else if conditionals cont'd
Basic PHP Tutorial 6: If else and else if conditionals cont'd
sentdex
Basic PHP Tutorial 1: Intro to PHP
Basic PHP Tutorial 1: Intro to PHP
sentdex
23 Basic PHP Tutorial 3: HTML with PHP
Basic PHP Tutorial 3: HTML with PHP
sentdex
24 Basic PHP Tutorial 9: While Loop
Basic PHP Tutorial 9: While Loop
sentdex
25 Basic PHP Tutorial 10: Switch Statement
Basic PHP Tutorial 10: Switch Statement
sentdex
26 Basic PHP Tutorial 2: Print and Echo
Basic PHP Tutorial 2: Print and Echo
sentdex
27 Basic PHP Tutorial 5: If else and else if conditional statements
Basic PHP Tutorial 5: If else and else if conditional statements
sentdex
28 Basic PHP Tutorial 8: Arithmatic Operators: Doing math with php
Basic PHP Tutorial 8: Arithmatic Operators: Doing math with php
sentdex
29 Basic PHP Tutorial 17: User Input Form Example / String Manipulation
Basic PHP Tutorial 17: User Input Form Example / String Manipulation
sentdex
30 Basic PHP Tutorial 18: HTML Entities and forms cont'd
Basic PHP Tutorial 18: HTML Entities and forms cont'd
sentdex
31 Basic PHP Tutorial 19: Finding words in strings
Basic PHP Tutorial 19: Finding words in strings
sentdex
32 Basic PHP Programming Tutorial 20: Saving to a File / writing and appending
Basic PHP Programming Tutorial 20: Saving to a File / writing and appending
sentdex
33 Basic PHP Programming Tutorial 22: Hashing part 2: salting
Basic PHP Programming Tutorial 22: Hashing part 2: salting
sentdex
34 Basic PHP Programming Tutorial 23: Variables in Strings and tokenizing
Basic PHP Programming Tutorial 23: Variables in Strings and tokenizing
sentdex
35 Basic PHP Programming Tutorial 21: MD5 Hashing For Security
Basic PHP Programming Tutorial 21: MD5 Hashing For Security
sentdex
36 Basic PHP Programming Tutorial 24: String similarity
Basic PHP Programming Tutorial 24: String similarity
sentdex
37 Basic PHP Programming Tutorial 25: Time and Time stamps
Basic PHP Programming Tutorial 25: Time and Time stamps
sentdex
38 Basic PHP Programming Tutorial 26: Die and Exit
Basic PHP Programming Tutorial 26: Die and Exit
sentdex
39 Basic PHP Programming Tutorial 27: MySQL Databases Part 1
Basic PHP Programming Tutorial 27: MySQL Databases Part 1
sentdex
40 Basic PHP Programming Tutorial 28: MySQL Database Part 2: Reading From Database
Basic PHP Programming Tutorial 28: MySQL Database Part 2: Reading From Database
sentdex
41 Basic PHP Programming Tutorial 29: MySQL Database Part 3: Inputting Data
Basic PHP Programming Tutorial 29: MySQL Database Part 3: Inputting Data
sentdex
42 Basic PHP Programming Tutorial 30: MySQL database in Use
Basic PHP Programming Tutorial 30: MySQL database in Use
sentdex
43 Django Tutorial Web Development with Python Part 1: Installing Django
Django Tutorial Web Development with Python Part 1: Installing Django
sentdex
44 Python Tutorial: File Deletion and Folder Deletion / directory deletion
Python Tutorial: File Deletion and Folder Deletion / directory deletion
sentdex
45 Python Tutorial: How to Rename Files and Move Files with Python
Python Tutorial: How to Rename Files and Move Files with Python
sentdex
46 3D Graphs in Matplotlib for Python: Basic 3D Line
3D Graphs in Matplotlib for Python: Basic 3D Line
sentdex
47 3D Plotting in Matplotlib for Python: 3D Scatter Plot
3D Plotting in Matplotlib for Python: 3D Scatter Plot
sentdex
48 3D Charts in Matplotlib for Python: Multiple datasets scatter plot
3D Charts in Matplotlib for Python: Multiple datasets scatter plot
sentdex
49 Sikuli Tutorial 1: Visually programming in python!
Sikuli Tutorial 1: Visually programming in python!
sentdex
50 Sikuli Tutorial 2: Program visually in python!
Sikuli Tutorial 2: Program visually in python!
sentdex
51 Sikuli Tutorial 3: Program visually in python!
Sikuli Tutorial 3: Program visually in python!
sentdex
52 3D Bar Charts in Python and Matplotlib
3D Bar Charts in Python and Matplotlib
sentdex
53 3D Plane wire frame Graph Chart in Python
3D Plane wire frame Graph Chart in Python
sentdex
54 Raspberry Pi Part 1 Introduction
Raspberry Pi Part 1 Introduction
sentdex
55 Raspberry Pi Part 8: First Download and Update! (Firmware)
Raspberry Pi Part 8: First Download and Update! (Firmware)
sentdex
56 Raspberry Pi Part 10: How to set up a Linux Web Server on your Pi
Raspberry Pi Part 10: How to set up a Linux Web Server on your Pi
sentdex
57 Raspberry Pi Part 11: Remote Desktop
Raspberry Pi Part 11: Remote Desktop
sentdex
58 Twitter Analysis: How to rank a user's influence
Twitter Analysis: How to rank a user's influence
sentdex
59 GPIO Tutorial for Pi Part 2 - Programming the GPIO
GPIO Tutorial for Pi Part 2 - Programming the GPIO
sentdex
60 GPIO Tutorial for Raspberry Pi Part 1 - Setting up
GPIO Tutorial for Raspberry Pi Part 1 - Setting up
sentdex

Related Reads

Up next
How to Get Your Brand Cited by ChatGPT, Claude and Gemini
Arvow
Watch →