Professional Documents
Culture Documents
Operation Sheet 2.3
Operation Sheet 2.3
1. Create a new php file using your Dreamweaver and save it as operation2.3.php inside the folder you
created.
2. Insert the line of code below the <meta charset="utf-8"> tag.
<script src="vendor/jquery/jquery.min.js"></script>
<script src="vendor/bootstrap/js/bootstrap.min.js"></script>
<script src="vendor/metisMenu/metisMenu.min.js"></script>
<script src="dist/js/customized.js"></script>
5. Insert the following html tags inside the <body> ….</body> tags.
<div class="container">
<div class="row">
<div class="col-md-4 col-md-offset-4">
</div>
</div>
</div>
6. Designing the Panel. Insert the following tags inside the <div class="col-md-4">
</form>
</div>
<div class="panel-footer"> Please type the necessary information</div>
</div>
7. Inserting the name label and textbox. Insert the following tags inside the <form> tag.
<div class="form-group">
<label for="Name"> Name:</label>
<input type="text" class="form-control" name="txtname" placeholder="Enter your name">
</div>
8. Inserting the Department label and select. Insert the following tags after the txtname group.
<div class="form-group">
<label for="Department">Department</label>
<select class="form-control" name="txtdepartment">
<option>ICT</option>
<option>Automotive</option>
<option>Construction</option>
<option>Manufacturing</option>
<option>Electrical-Electronics</option>
<option>Garments</option>
<option>Railways</option>
</select>
</div>
9. Inserting the Total Quiz label and textbox. Insert the following tags after the department group.
<div class="form-group">
<label for="Quiz">Total Quiz (1-20):</label>
<input type = "number" class="form-control" name = "txtquiz" min="0" max="20" required/>
</div>
10. Inserting the LAP Test label and textbox. Insert the following tags after the Quiz group.
<div class="form-group">
<label for="LAP">Total LAP Test (1-20):</label>
<input type = "number" class="form-control" name = "txtlap" min="0" max="20" required/>
</div>
11. Inserting the Project label and textbox. Insert the following tags after the LAP Test group.
<div class="form-group">
<label for="Project"> Total Project (1-20):</label>
<input type = "number" class="form-control" name = "txtproj" min="0" max="20" required/>
</div>
12. Inserting the Final Exam label and textbox. Insert the following tags after the Project group.
<div class="form-group">
<label for="FinalExam"> Total Final Exam (1-40):</label>
<input type = "number" class="form-control" name = "txtfinal" min="0" max="40" required/>
</div>
13. Inserting the Submit and Reset Button. Insert the following tags after the password group.
<div class="form-group">
<button type="submit" class="btn btn-block btn-social btn-danger" name="submit"> <i class="fa fa-table"></i>Compute</button>
<button type="reset" class="btn btn-block btn-social btn-danger" name="reset"> <i class="fa fa-refresh"></i>Reset Inputs</button>
</div>
14. Insert the following php scripts after the </form> tag.
<?php
if (isset($_REQUEST['submit']))
{
extract($_REQUEST);
$name=$_POST['txtname'];
$department=$_POST['txtdepartment'];
$quiz=$_POST['txtquiz'];
$lap=$_POST['txtlap'];
$proj=$_POST['txtproj'];
$final=$_POST['txtfinal'];
$total=$quiz+$lap+$proj+$final;
if ($total>=85)
{
echo 'Your Grade is Equivalent to A';
}
elseif ($total>=80)
{
echo 'Your Grade is Equivalent to A-';
}
elseif ($total>=75)
{
echo 'Your Grade is Equivalent to B+';
}
elseif ($total>=70)
{
echo 'Your Grade is Equivalent to B';
}
elseif ($total>=65)
{
echo 'Your Grade is Equivalent to B-';
}
elseif ($total>=60)
{
echo 'Your Grade is Equivalent to C';
}
elseif ($total>=55)
{
echo 'Your Grade is Equivalent to D';
}
else
{
echo 'Your Grade is Equivalent to F';
}
echo '<br>';
if ($total>=55)
{
echo 'Your Grade Passed';
}
else
{
echo 'Your Grade Failed';
}
}
?>