Is it better to learn html, javascript, php, then mysql if you want to start ur site? Is it better to learn it in that order?

Dani AI

Generated

Good instincts in the original question; the answers from , and point in the right direction. Below is a concise, practical workflow that fills gaps in the thread (local setup, secure DB access, common pitfalls) so the progression leads to a working, maintainable site.

Start with markup and style: learn semantic HTML and responsive CSS (mobile-first, flex/grid) and basic accessibility. Next add client-side behavior: DOM manipulation, event handling, and modern JavaScript (ES6 modules, promises/async). Use the browser devtools and a live-reload editor to iterate on static pages before adding any server code.

When ready to go server-side, combine the server language and database learning so form handling, sessions and persistence are practiced together. Use a local dev stack (PHP built-in server, XAMPP/WAMP/MAMP or Docker) rather than deploying immediately. Learn fundamental SQL (schema design, normalization, indexes) alongside secure server-side patterns: prepared statements, output escaping, and proper password hashing.

Small, secure PHP example (PDO + prepared statement + password hashing):

<?php
$pdo = new PDO('mysql:host=127.0.0.1;dbname=mydb;charset=utf8mb4', getenv('DB_USER'), getenv('DB_PASS'), [
  PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION
]);

$stmt = $pdo->prepare('INSERT INTO users (email, password_hash) VALUES (?, ?)');
$stmt->execute([$_POST['email'], password_hash($_POST['password'], PASSWORD_DEFAULT)]);

Practical workflow and troubleshooting notes: use git and a .gitignore for credentials; store secrets in environment variables; enable PHP error display only in development and consult server logs for blank pages; common PHP issues include parse errors, “headers already sent” (output before header()), and DB connection credentials/port errors. Once comfortable, learn a framework (Laravel or similar) to speed development and enforce best practices.

Recommended Answers

All 3 Replies

I think you are on right track. html, javascript, css are all client side technologies and are bit easy to grasp. And for these you just need a web-browser to practice.

php and mysql on other hand can be learn side by side as both are used very closely. And they required web server setup.

Well, HTML and JavaScript are client side as Luckychap said. If you are building a static web page (no database required), these two would be enough to build a web site. If you need to deal with database, then MySQL would be needed (unless you want to use other SQL engine). If you choose to use PHP to deal with database, then you need to learn both simultaneously (unless you are using other language to deal with database).

I started with DreamWeaver, and followed some tutorials on youtube. That taught me the basics of CSS and HTML. Then I tried adding some javascript for moving menus about and stuff, then had a go at PHP, MySQL just sort of creaped up on me, and it's really easy to use with php.

Just get a freehosting service like webhost000, they have php and MySQL on there and it's all free and easy to set up. Good Luck :)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.