Over the next few weeks (or days - depending on how much time i have) I'll help with the very basics of SQL (and PHP).

These are the points I'll be covering (all from scratch of course)

Local Server setting up

  • php
  • mysql
  • apache

Database Basics

  • Simple Database Creation
  • Database Uploading (& Converting)
  • Database connecting

PHP Basics

  • Simple PHP Creation (application based)

Database Intermediates

  • Myphp Admin Db creation
  • IP loggin and banning
  • Site user creations
  • Printing onscreen
  • SQL table queries

For this workshop you will require the following applications:

  • mysql
  • php
  • apache
  • ms access (or any other database creation application you are comfortable with)
  • ms access to mysql converter (if you using another application, just google it)
  • PHP Makers

NB: I'm not writing this guide for myself, and im not planning to spoon feed anyone. So Vol.1 will only be released if 5 or more members request it.

Dani AI

Generated

A compact, practical primer to complement ’s planned workshop and the follow-up requests from and . The focus below is the smallest, safe membership flow that closes gaps beginners commonly hit: a simple user model, core auth steps, security musts, and deployment notes that distinguish development from production.

A minimal users table example (relational model):

CREATE TABLE users (
  id INT AUTO_INCREMENT PRIMARY KEY,
  username VARCHAR(50) NOT NULL UNIQUE,
  email VARCHAR(255) NOT NULL UNIQUE,
  password_hash VARCHAR(255) NOT NULL,
  role VARCHAR(20) NOT NULL DEFAULT 'member',
  created_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
  last_login DATETIME NULL,
  is_active TINYINT(1) NOT NULL DEFAULT 1,
  reset_token VARCHAR(128) NULL,
  reset_expires DATETIME NULL,
  failed_logins INT NOT NULL DEFAULT 0,
  locked_until DATETIME NULL
);

Key implementation and security points:

  • Store only hashed passwords (use a modern, adaptive algorithm). Example (server-side language with built-in helpers):
    $hash = password_hash($password, PASSWORD_DEFAULT);
    if (password_verify($input, $hash)) { /* authenticated */ }
  • Always use parameterized queries / prepared statements to prevent SQL injection.
  • Protect sessions: regenerate session IDs after login, set HttpOnly and Secure cookie flags, and apply SameSite where possible.
  • Password reset must use single-use, time-limited tokens (never email plain passwords).
  • Apply the principle of least privilege: use a database account with only the rights needed for the application.

Deployment notes tied to earlier posts by and :

  • Same-machine hosting is fine for local development and testing. For production, prefer either a dedicated DB host or managed service, restrict network access to the DB (firewall / bind to internal address), and run regular encrypted backups with tested restores.
  • Start small: implement registration, login, protected pages, and password reset. Add logging, rate limiting and account lockouts as intermediate steps (addresses points raised by about site users and banning).

Quick troubleshooting tips: check server error logs for DB connection issues, confirm hashing/verification use the same algorithm, verify session paths and cookie behavior, and confirm file permissions prevent public access to configuration files.

Recommended Answers

All 13 Replies

Have a look at my tutorial for setting up a LAMP server on debian/ubuntu. It details exactly what packages you need to apt-get and how to change the MySQL root password.

I am requesting it... my goal is to create a Membership for my company. I would like my members to have Usernames and Passwords, and I would like to have a Login page. From my understanding, I'm going to need to have a database driven website to do this, and your knowledge would be very helpful. I'm very new to designing websites, databases, and computers altogether, so any help would be truly appreciated.

I hope everyone else feels the same way!

Yea me too. I have downloaded the applications but I was only able to try out oracle10 express. I have to some extent mastered SQL and way into PHP at the w3school site.
My question is that can I use my same system to set up as my database server OR i need another system entirely and if so, the security implications involved.
This LAMP on debian/ubuntu utorial jbennet menioned did not carry the link to he tutorial. Will he kindly do that?

Do you mean LAMP server on debian/ubuntu or the tutorial you wrote on it?

tutorial

Hello Macneato,

I know this post is fairly old but if you have created a volume by now can you please post it up. Your information would be greatly appreciated not only by me but from the whole community.

Thanks!
-Moodymoe15

Hello Macneato,
We are waiting pls. Do us the favour even if it is releasing it chapter by chapter. We really appreciate it.
Thanks.

For local installation & config of Apache, PHP, JSP, Ruby on Rails, MySQL, PHPMyAdmin & WordPress on Windows XP/2000 you can use this guide. Little outdated like jbennet tutorial ;), but is functional

peter_budo,

Thank you for your contribution to the community. It is much appreciated.

-Moe

Yeah im thinking about updating my tutorial and improving it

Me TOO I would love to see this in action, please post

Me TOO I would love to see this in action, please post

To see in action what???

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.