Skip to content

A secure, responsive Student Registration System built with PHP, MySQL, and Tailwind CSS. Features real-time form validation, CSRF protection, and SQL injection prevention. Easy XAMPP setup for quick deployment, ideal for schools, colleges, and training centers to manage student records efficiently.

License

Notifications You must be signed in to change notification settings

AvatarParzival/student-registration-system

Repository files navigation

Student Registration System

XAMPP Compatible PHP Version MySQL Ready

A secure, responsive student management system with a modern UI, designed to work seamlessly with XAMPP.


🌟 Features

  • One-Click XAMPP Setup
  • Mobile-First Responsive Design
  • Real-Time Form Validation
  • CSRF Protected Forms
  • Interactive Student Dashboard

🛠️ Installation (XAMPP)

1️⃣ Install XAMPP

Download and install the latest version:
https://www.apachefriends.org/download.html


2️⃣ Setup Project

# Clone repository or download as Zip
git clone https://github.com/AvatarParzival/student-registration-system

# Move to XAMPP's htdocs:
# Windows:
move student-registration-system C:\xampp\htdocs\

# macOS/Linux:
mv student-registration-system /opt/lampp/htdocs/

3️⃣ Start Services

Launch XAMPP Control Panel and start:

  • Apache
  • MySQL

Screenshot


4️⃣ Database Setup

Method 1 — SQL Command

  1. Open phpMyAdmin: http://localhost/phpmyadmin
  2. Run:
CREATE DATABASE internship_db;
  1. Import database.sql from the project folder.

Method 2 — phpMyAdmin Interface

  1. Open http://localhost/phpmyadmin
  2. Click "New" in the left sidebar.
  3. Enter internship_db as the Database Name.
  4. Click Create.
  5. Select the newly created database from the left panel.
  6. Go to the Import tab.
  7. Choose the database.sql file from your project folder.
  8. Click Go to import.

5️⃣ Configure Database

Edit db.php:

<?php
$server = 'localhost';
$user = 'root';     // Default XAMPP username
$pass = '';         // Default XAMPP password
$db   = 'internship_db';

6️⃣ Launch Application

Access in browser:
http://localhost/student-registration-system/index.html


📸 Screenshots

Registration Form Student Dashboard
Register Students

🖥️ Technologies

Component Technology Stack
Frontend Tailwind CSS, Vanilla JS
Backend PHP 8+
Database MySQL
Security CSRF Tokens, Prepared Statements

🚨 Troubleshooting

Issue Solution
Connection errors Verify MySQL is running in XAMPP
Page not loading Check files are in htdocs folder
Form submission fails Ensure Apache is running
Database issues Re-import database.sql

📂 Project Structure

student-registration/
├── api/
│   └── toggle.php
├── app.js
├── csrf.php
├── database.sql
├── db.php
├── delete_student.php
├── index.html
├── register.php
├── style.css
└── view_student.php


🔒 Security Features

Double-Layer Protection:

// CSRF Example
if (!isset($_SESSION['csrf']) || $_POST['csrf'] !== $_SESSION['csrf']) {
    die("Security violation detected");
}

SQL Injection Prevention:

$stmt = $conn->prepare("INSERT INTO students VALUES(?,?,?,?)");
$stmt->bind_param("ssss", $name, $email, $roll, $dept);

💡 Pro Tips

  • Enable Debug Mode (in db.php):
$conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
  • Create Database Backup:
mysqldump -u root -p internship_db > backup.sql
  • Use Virtual Host for cleaner URLs:
127.0.0.1 studentapp.local

🤝 Contributing

  1. Fork the repository
  2. Create a new branch:
git checkout -b feature
  1. Commit changes:
git commit -m 'Add feature'
  1. Push to branch:
git push origin feature
  1. Open a Pull Request

About

A secure, responsive Student Registration System built with PHP, MySQL, and Tailwind CSS. Features real-time form validation, CSRF protection, and SQL injection prevention. Easy XAMPP setup for quick deployment, ideal for schools, colleges, and training centers to manage student records efficiently.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published