hai friendz !!!!
Any one have online examination codez in php ???
plz help me !if u hav send it 2 me........plz its urgent......................

Dani AI

Generated

Request was for a simple PHP online examination system. As noted, a multiple‑choice engine is straightforward; asked for an example and correctly reminded about asking clear questions. The short blueprint below covers a minimum schema, runtime flow, and key security/testing points needed to move from idea to a reliable MVP.

A minimal database layout (core tables):

CREATE TABLE users (id INT AUTO_INCREMENT PRIMARY KEY, username VARCHAR(100) UNIQUE, password_hash VARCHAR(255), role ENUM('admin','student'), created_at DATETIME);
CREATE TABLE exams (id INT AUTO_INCREMENT PRIMARY KEY, title VARCHAR(255), duration_seconds INT, active TINYINT(1));
CREATE TABLE questions (id INT AUTO_INCREMENT PRIMARY KEY, exam_id INT, question_text TEXT, points DECIMAL(5,2));
CREATE TABLE choices (id INT AUTO_INCREMENT PRIMARY KEY, question_id INT, choice_text TEXT, is_correct TINYINT(1));
CREATE TABLE attempts (id INT AUTO_INCREMENT PRIMARY KEY, user_id INT, exam_id INT, started_at DATETIME, finished_at DATETIME, score DECIMAL(6,2));
CREATE TABLE answers (id INT AUTO_INCREMENT PRIMARY KEY, attempt_id INT, question_id INT, choice_id INT NULL, text_answer TEXT, answered_at DATETIME);

Runtime essentials and best practices: store correct answers server‑side only; present questions paginated or one-by-one; enforce server time for timers; autosave answers (AJAX) to handle disconnects; randomize question and choice order per attempt to reduce collusion; compute score on finish or asynchronously for large tests. Use prepared statements (PDO) and password_hash for credentials (PDO prepared statements, password_hash). Regenerate session IDs on login and validate tokens to reduce session fixation/CSRF.

Security, integrity and testing notes: log attempts and IPs, limit retries, protect admin pages, validate all inputs server‑side, and review retention/privacy rules before storing exam data. Start with the simple flow above to satisfy and ; expand later to include essay grading, analytics, and integrations once the core is stable.

Recommended Answers

All 5 Replies

hai friendz !!!!
Any one have online examination codez in php ???
plz help me !if u hav send it 2 me........plz its urgent......................

Are you talking about an exam, like a multiple choice test? If so, dude that would be such an easy script to write. Why don't you give it a try. If you understand programming concepts and know how to read you should have no problem.

hai rob,
ya . if u kno the steps plz forword to me .............

I think, it is good to post a simple example of that, or at least guide in detail how to do that.

I am also interested in this topic

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.