Question

Write a programming code in php language to implement/run a USSD digital voting system ..The programming...

Write a programming code in php language to implement/run a USSD digital voting system ..The programming code should work perfectly

Homework Answers

Answer #1

index.html:

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>CR Voting | Green Syntax</title>

    <!-- Bootstrap -->
    <link href="css/bootstrap.min.css" rel="stylesheet">

    <link href='http://fonts.googleapis.com/css?family=Ubuntu' rel='stylesheet' type='text/css'>
    <link href='http://fonts.googleapis.com/css?family=Raleway' rel='stylesheet' type='text/css'>
    <link href='http://fonts.googleapis.com/css?family=Oswald' rel='stylesheet' type='text/css'>
    <link href='http://fonts.googleapis.com/css?family=Roboto+Condensed' rel='stylesheet' type='text/css'>

    <style>

    body{
      margin:0px;
      padding:0px;
    }
      .headerFont{
        font-family: 'Ubuntu', sans-serif;
        font-size: 24px;
      }

      .subFont{
        font-family: 'Raleway', sans-serif;
        font-size: 14px;
      
      }
    
      .specialHead{
        font-family: 'Oswald', sans-serif;
      }

      .normalFont{
        font-family: 'Roboto Condensed', sans-serif;
      }

      a {
        color: #FFFFFF;
        text-decoration: none;
      }

      a:link {
        color: #FFFFFF;
        text-decoration: none;
      }

      /* visited link */
      a:visited {
          color: #FFFFFF;
          text-decoration: none;
      }

      /* mouse over link */
      a:hover {
          color: #FFFFFF;
          text-decoration: none;
      }

      /* selected link */
      a:active {
          color: #FFFFFF;
          text-decoration: none;
      }
    </style>
</head>
<body>
  
   <div class="container">
   <nav class="navbar navbar-default navbar-fixed-top navbar-inverse
    " role="navigation">
      <div class="container">
        <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#example-nav-collapse">
          <span class="icon-bar"></span>
          <span class="icon-bar"></span>
          <span class="icon-bar"></span>
        </button>

      <div class="container-fluid">
        <div class="row">
          <div class="col-sm-12">
            <div class="jumbotron text-center text-block" style="padding-top:170px;">
              <img src="images/Vote.png" >
                  <h1 class="specialHead">Online Voting System</h1>

                  <a href="cast.html" class="btn btn-primary btn-md specialHead"> <span class="glyphicon glyphicon-tag"></span> Cast Your Vote</a>
            </div>
          </div>
        </div>
      </div>

      <div class="conatiner" id="featuresTab">
        <div class="row">
          <div class="col-sm-12 text-center">
            <div class="page-header" style="padding-top:50px;padding-bottom:50px">
              <h1 class="normalFont" style="font-size:44px;" >WHAT IS IT.</h1>
              <p class="subFont" style="font-size:24px;"><em>A Intractive Way To Solve Conventional Voting.</em></p>
            </div>
          </div>
        </div>
      </div>

      <footer>
        <div class="container">
          <div class="row">
            <div class="col-sm-6 text-center">
             <h2 class="specialHead">Deep<br></h2>
            </div>

          </div>
        </div>
      </footer>
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script>
    <script src="js/bootstrap.min.js"></script>
</body>
</html>

cast.html:

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>Voting Panel</title>

    <!-- Bootstrap -->
    <link href="css/bootstrap.min.css" rel="stylesheet">

    <link href='http://fonts.googleapis.com/css?family=Ubuntu' rel='stylesheet' type='text/css'>
    <link href='http://fonts.googleapis.com/css?family=Raleway' rel='stylesheet' type='text/css'>
    <link href='http://fonts.googleapis.com/css?family=Oswald' rel='stylesheet' type='text/css'>
    <link href='http://fonts.googleapis.com/css?family=Roboto+Condensed' rel='stylesheet' type='text/css'>

    <style>
      .headerFont{
        font-family: 'Ubuntu', sans-serif;
        font-size: 24px;
      }

      .subFont{
        font-family: 'Raleway', sans-serif;
        font-size: 14px;
      
      }
    
      .specialHead{
        font-family: 'Oswald', sans-serif;
      }

      .normalFont{
        font-family: 'Roboto Condensed', sans-serif;
      }
    </style>
</head>
<body>
  
<div class="container">
    <nav class="navbar navbar-default navbar-fixed-top navbar-inverse
    " role="navigation">
      <div class="container">
        <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#example-nav-collapse">
          <span class="icon-bar"></span>
          <span class="icon-bar"></span>
          <span class="icon-bar"></span>
        </button>
        <div class="navbar-header">
          <a href="index.html" class="navbar-brand headerFont text-lg"><strong>eVoting</strong></a>
        </div>

        <div class="collapse navbar-collapse" id="example-nav-collapse">
          <ul class="nav navbar-nav">
          -->
          </ul>
        

          <button type="submit" class="btn btn-success navbar-right navbar-btn"><span class="normalFont"><strong>Admin Panel</strong></span></button>
        </div>

      </div> <!-- end of container -->
    </nav>

    <div class="container" style="padding:100px;">
      <div class="row">
        <div class="col-sm-12" style="border:2px solid gray;">
        
          <div class="page-header">
            <h2 class="specialHead">Choose Your Candidate.</h2>
            <p class="normalFont">Prove Your Authencity of being correct voter.</p>
          </div>
        
          <form action="saveVote.php" method="POST">
          <div class="form-group">
            <label>Voter's Name :</label><br>
          
            <input type="text" name="voterName" pattern="[A-Za-z]{6,}" title="Enter Your Full Name" placeholder="Enter Your Full Name" class="form-control" required/><br>

            <label>Voter's Registered Email ID :</label><br>
            <input type="text" name="voterEmail" placeholder="Enter Your Email ID" class="form-control"/><br>

            <label>Voter's Card No. :</label><br>
            <input id="id1" type="text" name="voterID" placeholder="Enter Your Voter Uniquie ID" class="form-control" required/><br>
          
            <h3 class="normalFont">Selet Any One of Them</h3>
            <div class="radio">
              <label for="">
                <input type="radio" name="selectedCandidate" value="BJP"> <strong>ABC</strong>
              </label><br>

              <label for="">
                <input type="radio" name="selectedCandidate" value="INC"> <strong>XYZ</strong>
              </label><br>
            
              <label for="">
                <input type="radio" name="selectedCandidate" value="AAP"> <strong>PQR</strong>
              </label><br>

              <label for="">
                <input type="radio" name="selectedCandidate" value="TMC"> <strong>DPK</strong>
              </label><br>
              <br>
              <hr>
              <button type="submit" name="submit" class="btn btn-primary"><strong>Submit</strong></button>
              <button type="submit" class="btn btn-default">Decline</button>
            </div>
          </div>
          </form>

        </div>
      </div>
    </div>
</div>
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script>
    <script src="js/bootstrap.min.js"></script>
</body>
</html>

saveVote:


<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>Bootstrap 101 Template</title>

    <!-- Bootstrap -->
    <link href="css/bootstrap.min.css" rel="stylesheet">

    <link href='http://fonts.googleapis.com/css?family=Ubuntu' rel='stylesheet' type='text/css'>
    <link href='http://fonts.googleapis.com/css?family=Raleway' rel='stylesheet' type='text/css'>
    <link href='http://fonts.googleapis.com/css?family=Oswald' rel='stylesheet' type='text/css'>
    <link href='http://fonts.googleapis.com/css?family=Roboto+Condensed' rel='stylesheet' type='text/css'>

    <style>
      .headerFont{
        font-family: 'Ubuntu', sans-serif;
        font-size: 24px;
      }

      .subFont{
        font-family: 'Raleway', sans-serif;
        font-size: 14px;
      
      }
    
      .specialHead{
        font-family: 'Oswald', sans-serif;
      }

      .normalFont{
        font-family: 'Roboto Condensed', sans-serif;
      }
    </style>
    </head>
<body>
  
   <div class="container">
   <nav class="navbar navbar-default navbar-fixed-top navbar-inverse
    " role="navigation">
      <div class="container">
        <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#example-nav-collapse">
          <span class="icon-bar"></span>
          <span class="icon-bar"></span>
          <span class="icon-bar"></span>
        </button>
        <div class="navbar-header">
          <a href="index.html" class="navbar-brand headerFont text-lg"><strong>eVoting</strong></a>
        </div>

        <div class="collapse navbar-collapse" id="example-nav-collapse">
          <ul class="nav navbar-nav">
          </ul>

          <button type="submit" class="btn btn-success navbar-right navbar-btn"><span class="normalFont"><strong>Admin Panel</strong></span></button>
        </div>

      </div> <!-- end of container -->
    </nav>
    <div class="container" style="padding-top:150px;">
       <div class="row">
           <div class="col-sm-4"></div>
           <div class="col-sm-4 text-center" style="border:2px solid gray;padding:50px;">
              
               <?php

          require('config.php');

                   if(isset($_POST["submit"])){
                   if(isset($_POST["voterName"]) && isset($_POST["voterEmail"]) && isset($_POST["voterID"]) && isset($_POST["selectedCandidate"]))
                   {
                       $name= test_input($_POST["voterName"]);
                       $email= test_input($_POST["voterEmail"]);
                       $voterID= test_input($_POST["voterID"]);
                       $selection= test_input($_POST["selectedCandidate"]);
                   }
               }
               else
               {
                   echo "<br>All Field Recquired";
               }
              
       $DB_HOST= "localhost";
       $DB_USER="root";
       $DB_PASSWORD="";
       $DB_NAME="db_evoting";

        $conn= @mysqli_connect($DB_HOST,$DB_USER,$DB_PASSWORD,$DB_NAME)
        or die("Couldn't Connect to Database :");
               $sql= "INSERT INTO db_evoting.tbl_users VALUES(null,'".$name."','".$email."','".$voterID."','".$selection."');";
                if(mysqli_query($conn, $sql)){
                   echo "<img src='images/success.png' width='70' height='70'>";
                   echo "<h3 class='text-info specialHead text-center'><strong> YOU'VE SUCCESSFULLY   VOTED.</strong></h3>";
                   echo "<a href='index.html' class='btn btn-primary'> <span class='glyphicon glyphicon-ok'></span> <strong> Finish</strong> </a>";
               }
               else
               {
                   echo "<img src='images/error.png' width='70' height='70'>";
                   echo "<h3 class='text-info specialHead text-center'><strong> SORRY! WE'VE SOME ISSUE..</strong></h3>";
                   echo "<a href='index.html' class='btn btn-primary'> <span class='glyphicon glyphicon-ok'></span> <strong> Finish</strong> </a>";
               }
               ?>
           </div>
           <div class="col-sm-4"></div>
       </div>
    </div>

    </div>
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script>
    <script src="js/bootstrap.min.js"></script>
</body>
</html>

Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
make a complete code in c++ or php language to implement a USSD digital voting system...
make a complete code in c++ or php language to implement a USSD digital voting system .The code should run perfectly
C PROGRAMMING LANGUAGE The following code written in C programming language was run and displays 997705320....
C PROGRAMMING LANGUAGE The following code written in C programming language was run and displays 997705320. Explain why and how this program outputs this number. int main(void) { int a = 5, b =20; int* ptr = &a; int** ptr2 = &ptr; printf("%d\n", ((int)*ptr * (int)*ptr2)); return 0; }
PHP Question: _____________________________________________ Write the PHP code to list out all of the dates of the...
PHP Question: _____________________________________________ Write the PHP code to list out all of the dates of the current month and assign them to their given days. As an example, for the month of October 2020, the output should look something like this: October 2020       Monday: 5, 12, 19, 26 Tuesday: 6, 13, 20, 27 Wednesday: 7, 14, 21, 28 Thursday: 1, 8, 15, 22, 29 Friday: 2, 9, 16, 23, 30 Saturday: 3, 10, 17, 24, 31 Sunday: 4,...
Write and test code in MIPS assembly language program to implement algorithms "The Non-Restoring Algorithm "of...
Write and test code in MIPS assembly language program to implement algorithms "The Non-Restoring Algorithm "of an 8-bit integer the user shoud insert the number then by the algo well find the square root
LANGUAGE: JAVA (using greedy algorithm) Implement a dynamic programming solution to identify the least-cost way of...
LANGUAGE: JAVA (using greedy algorithm) Implement a dynamic programming solution to identify the least-cost way of performing a chained matrix multiplication. (this part is just for reference, need the code for below). (I want this second part to be solved using greedy algo)--> Also implement, to compare the costs, greedy way of performing chained matrix multiplication
Write an assembly language program that will implement the following:       If ( (AX >=BX) AND (CX...
Write an assembly language program that will implement the following:       If ( (AX >=BX) AND (CX < DX) ) goto LoopA Else go to LoopB (Here I want you to write the whole assembly program that could run in CMD. THANK YOU
Please write the code in Python. Write a program/function in any Object-Oriented programming language that will...
Please write the code in Python. Write a program/function in any Object-Oriented programming language that will implement Queue Abstract Data Type with the following functions/methods.  Any build-in/pre-defined Queue function/library (e.g., java.util.Queue in Java) is NOT allowed to use in your code. push(Element):  insert the input Element (e.g., String or Integer in Java) to the end of the queue. pop(): remove the head element of the queue and print the head element on screen. count():  return the total number of elements in the queue...
Perl language and by using VS Code: Write a program that reads a number, adds up...
Perl language and by using VS Code: Write a program that reads a number, adds up the cube of all the digits, and displays the result. Run your code with the following test number: 1242 It should give 81. Please include screenshots of your outputs.
Implement a COMPLETE GUI application for a pharmacy using Java as programming language NO DATABASE BACKEND...
Implement a COMPLETE GUI application for a pharmacy using Java as programming language NO DATABASE BACKEND IS NEEDED Instead the application should include necessary forms & functions for below activities : HR : manage employees, including their leaves and salary Payroll : manages salary of each employee Inventory : manages the stock of the pharmacy Supplier : procurement of medicines Sales : manages the sales done for each employee The implementation should also be based on object-oriented concepts, and students...
1) Write the assembly code to implement expression A = B + C * ((D -...
1) Write the assembly code to implement expression A = B + C * ((D - E) * F) on 3-, 2-, 1-, and 0- address machines. Do not rearrange the expression. In accordance with "good programming", computing the expression should not change the values of its operands. Feel free to use a temporary variable, perhaps called T, if you feel you need one. 2) For the four code implementations of (1), compute the total size of the program, assuming:...
ADVERTISEMENT
Need Online Homework Help?

Get Answers For Free
Most questions answered within 1 hours.

Ask a Question
ADVERTISEMENT