The PHP program for the given HTML page is
Lab3.php:
<?php
$name = $_POST["name"]; // get the name from the form
$month=$_POST["month"]; // get the month from the form
$date=$_POST["date"]; // get the date from the form
$year=$_POST["year"]; // get the year from the form
$month=substr($month,0,3); // get the first 3 characters from the month. Ex: from January you will get Jan.
$date=date_create($month."-".$date."-".$year); // to create the date from the given month, date and year.
$given_date = date_format($date,"m/d/y"); // to format the above date in to mm/dd/yy.
$curr_date=date("m/d/y"); // to get the current system date.
$diff = abs(strtotime($given_date) - strtotime($curr_date)); // to calculate the difference between given date and current date
$years = floor($diff / (365*60*60*24)); // to get the number of years from the given date and current date
$months = floor(($diff - $years * 365*60*60*24) / (30*60*60*24)); // to get the months
$days = floor(($diff - $years * 365*60*60*24 - $months*30*60*60*24)/ (60*60*24)); // to get the number of days
$final_days=abs(365-$days); // to get the days remaining.
print("<hr>"); // to get horizontal line
print("Your birthday is: ".$given_date) // to print the birthday.
print("<br>") // to enter into new line.
print("You are ".$years." years old."); // to print your are so and so years old.
print("<br>");
print("There are ".$final_days." days until your upcoming birthday.");
print("<br>");
print("<hr>")
Please write a PHP program and use the codes below to come up with the solution...
Write a PHP Script containing a function that calculates the tax (8%) on a purchase of $48.72. What I have so far. index.html <!DOCTYPE html> <html lang="en"> <head> <title>PHP Lab II</title> <meta charset="utf-8"> <link rel="stylesheet" href="main.css"> <meta name="robots" content="noindex, no follow, noarchive" /> <meta name="author" content="Michael Dimond Jr" /> </head> <body> <div id="wrapper"> <header> <h1>PHP Lab II</h1> </header> <main> <form action="display.php" method="post"> <div> <label>Sale Total: </label> <input type="text" name="sale_total"><br> <br> </div> ...
PHP - Use of classes This is a further development of the previous task, the participant registration. You must use the following Participant class. <?php class Deltaker { private $etterNavn; private $forNavn; private $fAar; function __construct(string $fornavn, string $etternavn, string $aar) { $this->forNavn = $fornavn; $this->etterNavn = $etternavn; $this->fAar = $aar; } function hentEtterNavn() : string { return $this->etterNavn; } function hentForNavn() : string { return $this->forNavn; } function hentFAar() : string{ return $this->fAar; } //Setters function settForNavn(string $fornavn) {...
using PHP.... the code below is a shipping form that has one input text type to enter the "package weight", destination with a select tag that has the option for New York or Out of State, insurance option with two radio buttons. radio value "yes" has a $10.00 insurance fee, and the no option has no fee, a submit button . all information is within a form with a method ="post" and an action ="<?php echo $_SERVER['PHP_SELF']; ?> <html> <head>...
Create a PHP-backed webpage that ask for a number and calculate is square 10 times. Hint 1: <html> <body> <h1>Iteration Program</h1> Today's date: <?php echo date("1 F d, Y"); ?> <h3>Enter a Value to Iterate</h3> <form action="results.php",method=post> <input type="text" name="data"> <p/> <input type="submit" value="Show Results"> </form> </body> </html> Hint 2: <html> <body> <h1>Iteration Results</h1> <b>Here are 10 iterations of the formula:<br/> y=x<sup>2</sup> </b> <p/> <!-- PHP Calculations start here! --> <?php $num = $_POST['data']; //Write your code Here! ?> </body>...
PHP code that is given :
<?php
// Here is where your preprocessing code goes
// An example is already given to you for the First Name
$fname = $_GET['fname'];
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Exercise 2 - GET Echo</title>
<style>
body {
margin:0;
padding:0;
font-family: Arial;
}
form {
margin:20px;
}
input[type="text"], input[type="password"] {
width:150px;
padding:3px;
font-size:1em;
}
input[type="submit"] {
padding:3px;
font-size:1em;
}
label {
display:inline-block;
width:150px;
}
.input-container {
padding:5px;
}
</style>
</head>
<body>
<form...
I need help, I have my page set up, I just need help with some aesthetics, and getting the clear button to work, and get a popup when they click submit that says success along as all fields are filled out correctly. Any help would be fantastic. <html lang="en"> <head> <meta charset="utf-8"> <link rel="stylesheet" href="styleSheet.css" /> <title>2020-2021 Student-Athlete Registration Form - Weber State University</title> </head> <body> <header> <h1>WEBER STATE UNIVERSITY</h1> </header> <div class="link"> <ul> <li><a href="page 1.html"><span class="text">Home</span></a></li> </ul> </div>...
Both codes <!DOCTYPE html> <html> <head> <title>Week 8 Lab - JavaScript DOM and Arrays</title> <meta charset="utf-8"> </head> <body> <h2>Order Form</h2> <form name="orderForm" method="post" action="processForm.html"> <table> <tr> <th colspan="2">Personal Information</th> </tr> <tr> <td>First Name:</td> <td><input type="text" name="firstName" id="firstName" size="30"></td> </tr> <tr> <td>Last Name:</td> <td><input type="text" name="lastName" id="lastName" size="30"></td> </tr> <tr> <td>Address:</td> <td><input type="text" name="address" id="address" size="30"></td> </tr> <tr> <td>City:</td> <td><input type="text" name="city" id="city" size="30"></td> </tr> <tr> <td>Province:</td> <td><select name="province" id="province" size="1"> <option disabled>Select a province</option> <option value="BC">British Columbia</option> <option value="AB">Alberta</option> <option...
How can I print the Database table in PHP please ? here I have form for name and email, also I have php code that allow user to add his name and email to my database, all I need to print my final database when the user click on submit. <form action="" method="post"> <label>Name :</label> <input type="text" name="name" required="required" placeholder="Please Enter Name"/><br /><br /> <label>Email :</label> <input type="email" name="email" required="required" /><br/><br /> <input type="submit" value=" Submit " name="submit"/><br /> </form>...
LANGUAGE JAVASCRIPT, PHP
Need help with PHP and ajax code. The user needs to login but, I
keep getting an error that I coded "Wrong username and password!"
***PLEASE DONT GIVE ME A NEW CODE THAT IS NOWHERE NEAR
THE CODE I SUBMITTED***** PLEASE LOOK AT THE CODE AND SEE ANY
ISSUES
login.html
<!DOCTYPE html>
<html>
<head>
<title>login popup</title>
<script
src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<style type="text/css">
body {
background-color: white;
}
</style>
</head>
<body>
<center>
<h1 style="text-align: center;"> Login </h1>
<form>
Login
ID:...
Hello! I am to create a .js file that allows the paragraph on the bottom of the page to update with what the user enters. I need to modify the given HTML to recognize the javascript file that I am to make from scratch. The HTML file and other details are below: Use the given HTML to add functionality to an interactive form that generates an invitation to volunteers for an event. The file will have the following invitation message...