The Digital Voting System is a PHP-based application designed to facilitate secure and efficient online voting. This platform provides a user-friendly experience for voters, administrators, and election managers. It incorporates technologies like JavaScript, PHP, and CSS to create a responsive and interactive digital voting solution.
- Voter Registration: Allow users to register securely with unique credentials.
- Authentication: Login functionality for both voters and administrators.
- Voting System:
- Cast votes securely.
- Ensure a single vote per user.
- Admin Dashboard:
- Manage voters and candidates.
- Monitor and tally votes in real-time.
- Election Results: Display results dynamically with real-time updates.
- Responsiveness: Fully responsive design to support both desktop and mobile devices.
- PHP: Backend logic and server-side processing.
- JavaScript: Client-side interactivity and dynamic functionality.
- CSS: Styling and layout design.
- HTML: Structuring the web pages.
- Hack: Enhancements for PHP-based functionality.
Follow these steps to set up the Digital Voting project locally:
-
Clone the Repository:
git clone https://github.com/karimshaban01/digital-voting.git
-
Navigate to the Project Directory:
cd digital-voting
-
Set Up a Local Server:
- Install XAMPP (or any LAMP/WAMP server).
- Place the project folder inside the
htdocs
directory (if using XAMPP).
-
Create a Database:
- Access
phpMyAdmin
(usually available athttp://localhost/phpmyadmin
). - Create a new database (e.g.,
digital_voting
). - Import the provided
.sql
file into the database.
- Access
-
Configure the Database Connection:
- Locate the configuration file (e.g.,
config.php
). - Update the database credentials:
$host = 'localhost'; $user = 'root'; $password = ''; $dbname = 'digital_voting';
- Locate the configuration file (e.g.,
-
Run the Application:
- Open your browser and navigate to
http://localhost/digital-voting
.
- Open your browser and navigate to
- Log in to the admin dashboard.
- Add, edit, or delete voter and candidate information.
- Monitor the election process and view real-time results.
- Register and log in with your credentials.
- View the list of available candidates.
- Cast your vote securely.
- View confirmation of your vote.
Below is an overview of the major files and directories in the project:
index.php
: Entry point of the application./config
: Configuration files for database and application settings./assets
: Static files (images, CSS, JavaScript)./templates
: HTML templates for the frontend./includes
: Reusable PHP components (e.g., header, footer, database connection)./admin
: Admin dashboard for managing the voting process.
Contributions are welcome! To contribute:
- Fork the repository.
- Create a new branch for your feature or bug fix:
git checkout -b feature-name
- Commit your changes:
git commit -m "Add feature or fix description"
- Push to your fork and submit a pull request.
This project is licensed under the MIT License.