A full-stack academic web application for managing university activities with secure interfaces for students and administrators. Built with pure PHP, MySQL, and vanilla JavaScript without any frameworks.
- ✅ Secure registration & login system
- ✅ Browse university information (courses, sports, facilities)
- ✅ Contact form with database storage
- ✅ Session-based authentication
- ✅ Responsive and clean user interface
- 🔐 Secure admin authentication with session timeout
- 📊 Interactive dashboard with statistics
- 👥 User management (enable/disable, soft delete)
- 📩 Contact message management (hide/unhide)
- 🔍 Advanced search functionality
- 📄 Pagination for large datasets
- ♻️ Soft delete for data safety
- 🔒 Password hashing with
password_hash() - ⏱️ Session timeout protection
- 🚫 SQL injection prevention
- 🛡️ XSS protection
- 🔐 Protected admin routes
university_portal/
├── assets/
│ ├── css/
│ │ ├── main.css # Main site styling
│ │ └── login-Registration.css # Login & Register styling
│ └── images/ # All website images (logo, screenshots, etc.)
├── database/
│ └── university_portal.sql # Database schema + sample data
├── index.php # Home page
├── about.php # About university
├── sports.php # Sports page
├── course.php # Courses offered
├── contact.php # Contact form
├── login.php # Student login
├── registration.php # Student registration
├── admin_login.php # Admin login
├── admin_register.php # Admin registration
├── admin.php # Admin dashboard
├── admin_logout.php # Admin logout
├── database.php # Database connection
├── .gitignore
└── README.md
CREATE TABLE users (
id INT PRIMARY KEY AUTO_INCREMENT,
full_name VARCHAR(100) NOT NULL,
email VARCHAR(100) UNIQUE NOT NULL,
password VARCHAR(255) NOT NULL,
is_disabled BOOLEAN DEFAULT FALSE,
is_deleted BOOLEAN DEFAULT FALSE,
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);users (Students)
| Column | Purpose |
|---|---|
| id | Primary key |
| full_name | Student name |
| Login email | |
| password | Hashed password |
| is_disabled | Enable / Disable user |
| is_deleted | Soft delete |
| created_at | Registration date |
CREATE TABLE admin (
id INT PRIMARY KEY AUTO_INCREMENT,
password VARCHAR(255) NOT NULL,
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);admin (Admins)
| Column | Purpose |
|---|---|
| id | Admin ID |
| password | Hashed password |
| created_at | Admin creation date |
CREATE TABLE contact (
id INT PRIMARY KEY AUTO_INCREMENT,
name VARCHAR(100) NOT NULL,
email VARCHAR(100) NOT NULL,
message TEXT NOT NULL,
is_hidden BOOLEAN DEFAULT FALSE,
is_deleted BOOLEAN DEFAULT FALSE,
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);contact (Messages)
| Column | Purpose |
|---|---|
| id | Message ID |
| name | Sender name |
| Sender email | |
| message | Message text |
| is_hidden | Hide / Unhide |
| is_deleted | Soft delete |
| created_at | Message date |
- XAMPP (Apache & MySQL)
- PHP 7.4+
- MySQL 5.7+
- Web browser
- Clone the repository
git clone https://github.com/jaydipmodasiya/university_portal.git
cd university_portal-
Set up XAMPP
- Install XAMPP from apachefriends.org
- Move the project folder to
C:\xampp\htdocs\(Windows) or/opt/lampp/htdocs/(Linux)
-
Start Services
- Open XAMPP Control Panel
- Start Apache and MySQL
-
Create Database
# Open phpMyAdmin: http://localhost/phpmyadmin
# Create new database: university_portal
# Import: database/university_portal.sql- Configure Database Connection
Edit
database.phpif needed:
$hostname = "localhost";
$dbuser = "root"; // Default XAMPP username
$dbPassword = ""; // Default XAMPP password (empty)
$dbname = "university_portal";- Access the Application
Student Portal: http://localhost/university_portal
Admin Login: http://localhost/university_portal/admin_login.php
- Username:
admin(default in database) - Password:
admin123(change after first login)
- Register new account via registration page
| Student Home Page | Admin Dashboard |
|---|---|
![]() |
![]() |
| Admin Login | Student Login |
|---|---|
![]() |
![]() |
| Registration | Contact Form |
|---|---|
![]() |
![]() |
| About | Course |
|---|---|
![]() |
![]() |
- PHP - Server-side scripting
- MySQL - Database management
- Sessions - User authentication
- PDO/Mysqli - Database operations
- HTML5 - Markup structure
- CSS3 - Styling and layout
- JavaScript - Client-side interactivity
- Responsive Design - Mobile-friendly UI
- Password Hashing -
password_hash()andpassword_verify() - Session Management - Secure user sessions
- Input Validation - Form data sanitization
- SQL Injection Prevention - Prepared statements
- ✅ Built complete MVC architecture without frameworks
- ✅ Implemented secure authentication system
- ✅ Created RESTful API-like structure
- ✅ Managed database transactions efficiently
- ✅ Implemented password hashing and verification
- ✅ Added session timeout protection
- ✅ Prevented SQL injection attacks
- ✅ Secured admin routes and endpoints
- ✅ Designed normalized database schema
- ✅ Implemented soft delete functionality
- ✅ Created efficient pagination system
- ✅ Managed database relationships
- ✅ Created responsive UI without frameworks
- ✅ Implemented client-side validation
- ✅ Designed consistent color scheme
- ✅ Built interactive admin dashboard
- Install XAMPP
- Place project in
htdocsfolder - Import SQL file
- Configure database connection
- Access via
http://localhost/university_portal
- Upload files to web server
- Create MySQL database
- Import SQL file
- Update
database.phpwith hosting credentials - Set proper file permissions (755 for folders, 644 for files)
Contributions are welcome! Here's how you can help:
- Fork the repository
- Create a feature branch
git checkout -b feature/AmazingFeature- Commit your changes
git commit -m 'Add some AmazingFeature'- Push to the branch
git push origin feature/AmazingFeature- Open a Pull Request
- Follow existing code style
- Add comments for complex logic
- Update documentation as needed
- Test thoroughly before submitting
This project is licensed under the MIT License - see the LICENSE.txt file for details.
MIT License
Copyright (c) 2024 Jaydip Modasiya
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
Languages: PHP, JavaScript, HTML, CSS, SQL, Python, Java
Frameworks: Laravel, React, Bootstrap, Tailwind CSS
Databases: MySQL, PostgreSQL, MongoDB
Tools: Git, Docker, AWS, XAMPP, VS Code, Postman
Concepts: OOP, MVC, REST APIs, Authentication, Security
- GitHub: @jaydipmodasiya
- LinkedIn: @jaydipmodasiya
If you find this project helpful, please give it a star! ⭐
For queries, suggestions, or contributions:
- 📧 Open an issue on GitHub
- 💬 Discuss in project discussions
- 🔧 Submit a pull request
Made with ❤️ by Jaydip Modasiya







