Tool Script for income tax calculator in html css java php

 Tool Script for income tax calculator in html css java php

Tool Script for income tax calculator in html css java php

Index.html

 <!DOCTYPE html>

<html>

<head>

  <title>Income Tax Calculator</title>

  <style>

    body {

      font-family: Arial, sans-serif;

      background-color: #f2f2f2;

      margin: 0;

      padding: 20px;

    }


    .container {

      max-width: 400px;

      margin: 0 auto;

      background-color: #fff;

      padding: 20px;

      border-radius: 5px;

      box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);

    }


    h1 {

      text-align: center;

    }


    label {

      display: block;

      margin-bottom: 10px;

      font-weight: bold;

    }


    input[type="number"] {

      width: 100%;

      padding: 10px;

      border: 1px solid #ccc;

      border-radius: 4px;

    }


    .result {

      margin-top: 20px;

      font-weight: bold;

    }


    .btn {

      display: inline-block;

      background-color: #4CAF50;

      color: #fff;

      text-decoration: none;

      padding: 10px 20px;

      border-radius: 4px;

      cursor: pointer;

    }

  </style>

</head>

<body>

  <div class="container">

    <h1>Income Tax Calculator</h1>

    <form action="calculate.php" method="post">

      <label for="income">Annual Income:</label>

      <input type="number" name="income" id="income" placeholder="Annual Income" step="0.01" required>

      <button class="btn" type="submit">Calculate</button>

    </form>

  </div>

</body>

</html>


Calculate.php:


<!DOCTYPE html>
<html>
<head>
  <title>Income Tax Calculator</title>
  <style>
    body {
      font-family: Arial, sans-serif;
      background-color: #f2f2f2;
      margin: 0;
      padding: 20px;
    }

    .container {
      max-width: 400px;
      margin: 0 auto;
      background-color: #fff;
      padding: 20px;
      border-radius: 5px;
      box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    }

    h1 {
      text-align: center;
    }

    .result {
      margin-top: 20px;
      font-weight: bold;
    }

    .btn {
      display: inline-block;
      background-color: #4CAF50;
      color: #fff;
      text-decoration: none;
      padding: 10px 20px;
      border-radius: 4px;
      cursor: pointer;
    }
  </style>
</head>
<body>
  <div class="container">
    <h1>Income Tax Calculator</h1>
    <?php
      $income = $_POST['income'];

      // Perform income tax calculation logic here
      // Replace the following with your own calculations
      $tax = $income * 0.2;

      echo "<div class='result'>Income Tax: $" . $tax . "</div>";
    ?>
  </div>
</body>
</html>

Post a Comment

0 Comments