Start networking and exchanging professional insights

Register now or log in to join your professional community.

Follow

How do HTML, CSS, JavaScript, PHP and MySQL work together?

user-image
Question added by Reham Alfaqeer , PHP Web Developer , Syarah.com
Date Posted: 2016/08/14
Azeem Akram
by Azeem Akram , Senior PHP Developer , PI Pakistan- Tapmad Tv

HTML is the page that gets served up to the client’s web browser. Right click this page and hit View Source. That’s the HTML.

The CSS and client-side JS also basically come along with the HTML a fraction of a second later. In the context I’m guessing you’re asking about, they will what takes a page from boring, white, and static to pretty, dynamic and reactive.

MySQL is a database (aka a DB). You install this on your back-end/server and set it up. You can throw all your data in there to have shit done with it.

PHP is a back-end language. It can serve up HTML files and do other shit, like connect to DBs.

In this context, PHP can get data out of MySQL and send it to, say, client-side JavaScript that asks for the data, and then that JavaScript can plug it into the page.

For example, let’s say you’re making a (shitty, because you probably wouldn’t use LAMP) search engine.

You could have all the page links, titles, and interactions stored in a MySQL database in the back-end. You could then either create HTML/JS/CSS pages dynamically when someone asks for information, or you could just serve up those pages normally and then give the results to JavaScript (so the page wouldn’t have to be reloaded), and JavaScript (say Angular) would then throw the results up for users to see.

That’s basically how the pieces typically come together. If you understand it really well and get really fast, you can do stuff like this in a few days (well after things are appropriately spec-ed/planned out).

HTML and CSS works as front end. Whereas, JavaScript executes conditions and Php connects Javascript program to MySQL for retriving the data.

More Questions Like This

Do you need help in adding the right keywords to your CV? Let our CV writing experts help you.