Hello Daniweb Community,

I wish to use a microsoft access database for my website.

I want it to do the following:

1. work as a login script
2. work as the points script

I wish for users to log in using microsoft access - can I get a script for this.

I also wish for some code that will display a certain figure in my database.
Say a column is called black marks. and say there are 5 marks in there.

I want the code to display 5 marks in the area of my website I choose.

If someone can help that would be excellent.

Thank you
Grant

Dani AI

Generated

asked about using Microsoft Access for a website login and a points display. Using Access as a live web backend is possible on a Windows/IIS host with ODBC/ACE drivers, but it is fragile for public sites: file-based locking, limited concurrency, and many hosts (especially Linux) do not support the required drivers. 's suggestion to use PHP with a server-grade RDBMS is the usual, safer route.

A minimal, secure approach (for MySQL/MariaDB with PHP) is:

  • Schema: users with id, username, password_hash, points.
  • Store passwords with password_hash() and check with password_verify().
  • Always use prepared statements (PDO or MySQLi) to avoid SQL injection.
  • Manage sessions with session_start() and session_regenerate_id(true).
  • For point changes use atomic SQL (no read-modify-write in PHP).

Example table and minimal login flow:

CREATE TABLE users (
id INT AUTO_INCREMENT PRIMARY KEY,
username VARCHAR(100) NOT NULL UNIQUE,
password_hash VARCHAR(255) NOT NULL,
points INT NOT NULL DEFAULT 0
);

<?php
// PDO example (assumes $pdo)
$stmt = $pdo->prepare('SELECT id,password_hash,points FROM users WHERE username = ?');
$stmt->execute([$username]);
$user = $stmt->fetch(PDO::FETCH_ASSOC);
if ($user && password_verify($password, $user['password_hash'])) {
session_start();
session_regenerate_id(true);
$_SESSION['user_id'] = $user['id'];
}
?>

To display or change points:

SELECT points FROM users WHERE id = ?;
UPDATE users SET points = points + 1 WHERE id = ?;

Practical notes: export Access tables to CSV and import into MySQL/phpMyAdmin when migrating; double-check date formats and autonumber fields. If Access must remain, use ODBC/PDO_ODBC on a Windows host, keep tight file permissions and frequent backups. Always run the site over HTTPS, avoid storing plaintext passwords, use prepared statements, and add rate-limiting and CSRF protections for login/forms.

Recommended Answers

All 3 Replies

If this is easier with mysql I will do that too

Just I have no experience with mysql

You will probably need a combination of PHP and MySQL.

yeah I have recently bought two web design books

PHP
and
PHP and MYSQL By Larry Ullman (he is meant to be brilliant)

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.