https://github.com/hollali/voting
https://github.com/hollali/voting
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/hollali/voting
- Owner: hollali
- Created: 2023-09-14T22:18:36.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-11-24T01:45:06.000Z (over 1 year ago)
- Last Synced: 2025-01-11T15:23:16.410Z (5 months ago)
- Language: JavaScript
- Size: 8.7 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# voting
# PHP Voting System
This project is a simple voting system implemented using PHP, HTML, CSS, JavaScript, Bootstrap, and a MySQL database. The system allows users to vote for different options, and the votes are stored in a MySQL database.
## Features
- **Voting Interface**: Users can view options and cast their votes through an intuitive and user-friendly interface.
- **Real-Time Updates**: The system provides real-time updates on the number of votes each option has received.
- **MySQL Database**: Votes are stored in a MySQL database, enabling data persistence.
- **Responsive Design**: The interface is designed to be responsive and accessible on various devices.
## Technologies Used
- **PHP**: Backend scripting language for server-side processing.
- **MySQL**: Relational database management system for storing voting data.- **HTML/CSS**: Frontend markup and styling for the user interface.
- **JavaScript**: Enhances interactivity and updates in real-time.
- **Bootstrap**: Frontend framework for responsive and modern design.
## Project Structure
- **index.php**: Main HTML file containing the voting interface and real-time updates.
- **submit_vote.php**: PHP script handling the submission of votes to the database.- **config.php**: PHP file for configuring database connection parameters.
- **database.sql**: SQL file for creating the required database and tables.
- **css/style.css**: CSS file for custom styling.
- **js/script.js**: JavaScript file for client-side interactivity.
## Database Setup
1. Execute the queries in the `database.sql` file to create the necessary database and tables.
2. Update the database connection parameters in the `config.php` file with your MySQL credentials.
## Usage
1. Open `index.php` in a web browser to access the voting interface.
2. Users can view options, cast votes, and see real-time updates on the number of votes each option has received.
3. The submitted votes are stored in the MySQL database.
## Contributing
Feel free to contribute to the improvement of this basic voting system. Suggestions, enhancements, and additional features are welcome.
## License
This project is licensed under the [MIT License](LICENSE).
---
**Note:** This voting system is meant for educational purposes and may require additional security measures for production use. Consider implementing user authentication and input validation for a more robust system.