{"id":22051304,"url":"https://github.com/allanotieno254/calculator-using-php","last_synced_at":"2026-04-05T20:34:04.898Z","repository":{"id":264836694,"uuid":"894422624","full_name":"AllanOtieno254/calculator-using-php","owner":"AllanOtieno254","description":"This PHP Calculator is a simple yet powerful tool for performing basic arithmetic operations. Built using PHP, it offers a user-friendly interface and efficient calculation capabilities. Whether you need to add, subtract, multiply, or divide, this calculator provides a reliable solution for your mathematical needs.","archived":false,"fork":false,"pushed_at":"2024-11-26T10:54:49.000Z","size":76,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-28T21:33:39.872Z","etag":null,"topics":["arithmetic-operations","calculator","github-repository","open-source","php","software-development","usere-interface","web-development"],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/AllanOtieno254.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-11-26T10:30:01.000Z","updated_at":"2024-11-26T10:54:52.000Z","dependencies_parsed_at":"2024-11-26T11:42:38.781Z","dependency_job_id":"54fae6e0-1803-4e46-874e-e237767ce2e8","html_url":"https://github.com/AllanOtieno254/calculator-using-php","commit_stats":null,"previous_names":["allanotieno254/allan"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AllanOtieno254%2Fcalculator-using-php","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AllanOtieno254%2Fcalculator-using-php/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AllanOtieno254%2Fcalculator-using-php/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AllanOtieno254%2Fcalculator-using-php/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AllanOtieno254","download_url":"https://codeload.github.com/AllanOtieno254/calculator-using-php/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245121402,"owners_count":20564123,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["arithmetic-operations","calculator","github-repository","open-source","php","software-development","usere-interface","web-development"],"created_at":"2024-11-30T15:08:33.422Z","updated_at":"2025-12-30T23:31:45.205Z","avatar_url":"https://github.com/AllanOtieno254.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# calculator-using-php\n\n![calc](https://github.com/user-attachments/assets/99008b50-c20b-4f2a-a4a2-5379ba63de37)\n\n## Scientific Calculator\nThis project is a web-based scientific calculator built using PHP, JavaScript, HTML, and CSS. The calculator supports basic arithmetic operations (addition, subtraction, multiplication, division), as well as advanced mathematical functions like exponentiation, square roots, logarithms, and percentages.\n\n## Features\nBasic Arithmetic Operations: Addition, Subtraction, Multiplication, Division\nAdvanced Functions: Exponentiation, Square Root, Logarithm, Percentage\nUser-friendly Interface\nResponsive Design\n\n![code](https://github.com/user-attachments/assets/667b7ed6-b49c-4f1d-a0fd-12906bdf6434)\n\n\n## Directory Structure\ncalculator/\n│\n├── index.php\n├── calculate.php\n├── addition.php\n├── subtraction.php\n├── multiplication.php\n├── division.php\n├── exponentiation.php\n├── sqrt.php\n├── logarithm.php\n├── percentage.php\n├── styles.css\n├── scripts.js\n└── README.md\n\n\n## Installation\n## 1. Clone the repository:\ngit clone https://github.com/Allanotieno254Backup/calculator-using-php\n \n## 2. Navigate to the project directory:\ncd calculator\n\n## Set up a local web server:\nIf you are using XAMPP, move the project folder to the htdocs directory.\nmv calculator /path/to/xampp/htdocs/\n\n## Start the web server:\nOpen XAMPP and start the Apache server. \nAccess the calculator:\nOpen your web browser and navigate to http://localhost/calculator.\n\n## Usage\nBasic Arithmetic:\nUse the buttons on the calculator interface to perform addition (+), subtraction (-), multiplication (*), and division (/).\n\n## Advanced Functions:\n· Use the ^ button for exponentiation.\n· Use the √ button for square roots.\n· Use the log button for logarithms (base 10).\n· Use the % button to calculate percentages.\n\n## Clear and Delete:\n· Use the C button to clear the display.\n· Use the DEL button to delete the last character.\n\n## File Descriptions\nindex.php\nThe main entry point of the calculator. It includes the form for user input and the display area. It also contains the JavaScript functions for handling user interactions.\n\n## calculate.php\nHandles the form submission and determines which mathematical operation to perform based on the user input. It includes the appropriate PHP file for the operation and returns the result.\n\n## addition.php\nPerforms the addition operation. It takes the user input, splits it into numbers, and calculates the sum.\n\n## subtraction.php\nPerforms the subtraction operation. It takes the user input, splits it into numbers, and calculates the difference.\n\n## multiplication.php\nPerforms the multiplication operation. It takes the user input, splits it into numbers, and calculates the product.\ndivision.php\nPerforms the division operation. It takes the user input, splits it into numbers, and calculates the quotient.\n\n## exponentiation.php\nPerforms the exponentiation operation. It takes the user input, splits it into the base and exponent, and calculates the power.\n\n## sqrt.php\nPerforms the square root operation. It takes the user input, extracts the number, and calculates the square root.\n\n## logarithm.php\nPerforms the logarithm operation. It takes the user input, extracts the number, and calculates the base-10 logarithm.\n\n## percentage.php\nPerforms the percentage operation. It takes the user input, splits it into numbers, and calculates the percentage.\n\n## styles.css\nContains the CSS styles for the calculator interface. It ensures a responsive and user-friendly design.\n\n## scripts.js\nContains the JavaScript functions for handling user interactions and updating the display in real-time.\n\n\n## Troubleshooting\nIf the calculator is not working as expected, check the following:\n## 1. PHP Errors:\n· Ensure PHP is correctly installed and configured.\n· Check the PHP error log for any errors.\n\n## 2.JavaScript Errors:\n· Open the browser's developer tools and check the console for any JavaScript errors.\n\n## 3. Network Issues:\n· Ensure the web server is running and accessible.\n\n## License\nThis project is licensed under the MIT License. See the LICENSE file for details.\n\n## Contributing\nContributions are welcome! Please open an issue or submit a pull request on GitHub.\n\n## Acknowledgements\n· Thanks to the developers of PHP, JavaScript, HTML, and CSS for providing the tools to build this project.\n· Special thanks to the open-source community for their valuable resources and support.\n\n\n\n\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fallanotieno254%2Fcalculator-using-php","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fallanotieno254%2Fcalculator-using-php","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fallanotieno254%2Fcalculator-using-php/lists"}