| . Remember from the HTML section that it is | | | | This is an important aspect that differs PHP |
| one of the core parts of an HTML document. In | | | | mySQL from the other languages. PHP/mySQL are |
| this way you can think of the as the top of | | | | run from the server, or the computer that |
| the tree. If you place an element in the body | | | | your computer downloaded a web site from. |
| it is like a branch coming from the top of a | | | | HTML/CSS/JavaScript are run after the files |
| tree to that element and connecting it. Now | | | | have been downloaded to your computer by your |
| that there is this connection you can use | | | | computer via the browser. |
| JavaScript to be able to change whatever is | | | | |
| at that branch. | | | | This connection has many important and |
| | | | difficult implications. One is that you only |
| The language itself is very similar to c and | | | | have one shot at downloading content from a |
| is fairly easy to learn. What is difficult is | | | | server. After the page has been downloaded to |
| understanding how to navigate around the DOM | | | | download something else you have to reconnect |
| to make dynamic web pages. | | | | to the server to get fresh content. There are |
| | | | a few ways to do this, either requesting a |
| PHP & mySQL | | | | new page or by using JavaScript. |
| | | | |
| With the understanding of HTML/CSS/JavaScript | | | | Review |
| it is possible to make interactive websites. | | | | |
| But what if you want to be able to save | | | | Some final terminology is backend vs. |
| content that is provided by a viewer of your | | | | frontend. Frontend is what is being processed |
| site, i.e. a comment. The most basic use of | | | | by a host (your) computer via the browser. |
| PHP is to get content submitted from an HTML | | | | This is done with HTML/CSS/Javascript. You |
| site and put it into a mySQL database. | | | | have gone to a url and a server (computer) |
| | | | has sent you some documents. Your browser |
| A database is like an excel spreadsheet, or a | | | | looks at these documents and figures out what |
| bunch of rows and columns that are able to | | | | they say (HTML) and how to make them |
| hold many types of information. PHP and mySQL | | | | appear(CSS). If it wants to make the content |
| are the most common and free combination of | | | | move around it will use JavaScript. |
| script/database languages on the web right | | | | |
| now. | | | | The backend is everything the server can do, |
| | | | this includes providing the HTML/CSS |
| PHP is considered a scripting language. This | | | | JavaScript documents to sending off email. |
| is because it is not compiled, i.e there is | | | | This is done via PHP, and if any content is |
| no .exe or executable like if you are running | | | | to be stored it is stored using a mySQL |
| a program on your desktop. Instead when a | | | | database. |
| website needs something to happen it calls a | | | | |
| PHP script which is immediately interpreted | | | | Hopefully this will have provided a basic |
| by the server that is hosting the website. | | | | understanding of the different languages and |
| | | | aspects of a website. |