Assignment+3+php
Assignment+3+php
html}
<!--
Student Name: Aditya Bansal
Student Id: 0825487
Class: MIT439_004
Assignment: 3
Date: 31 January 2024
URL: https://w24aer.scweb.ca/MIT439/week3/conditionalform.html
-->
<!DOCTYPE html>
<html>
<head>
<title>Html widget order form - by {Aditya Bansal}</title>
</head>
<body>
<h2>Widget Order Form</h2>
Our widgets cost $2,000.00 each.<br />
<form action="conditional.php" method="post">
How many widgets would you like to order:
<input type="text" name="quantity" size="4"><br /><br />
<input type="submit" name="submit" value="submit!">
<input type="reset" name="reset" value="reset!">
</form>
</body>
</html>
{conditionalform.php}
<!--
Student Name: Aditya Bansal
Student Id: 0825487
Class: MIT439_004
Assignment: 3
Date: 31 January 2024
URL: https://w24aer.scweb.ca/MIT439/week3/conditional.php
-->
<!DOCTYPE html>
<html>
<head>
<title>conditionals.php</title>
</head>
<body>
<?php
$quantity = $_POST['quantity'];
$cost = 2000.00;
$discount = 100.00;
$tax = 0.13;
<!--
Student Name: Aditya Bansal
Student Id: 0825487
Class: MIT439_004
Assignment: 3
Date: 31 January 2024
URL: https://w24aer.scweb.ca/MIT439/week3/registerForm.php
-->
<!DOCTYPE html>
<html>
<head><title>Register Form</title></head>
<body>
<h2>Welcome to the ABC Web Site</h2>
<h3> - programmed by Aditya Bansal - </h3>
<form action="reply.php" method="post">
<p>
Enter your name: <input type="text" name="username"><br />
You live in: <input type="text" name="region"><br /><br />
<input type="submit" name="SUBMIT" value="Submit">
<input type="reset" name="RESET" value="Clear"></p>
</form>
<p><br /><em>
<?php
echo "Date: " . date('F dS, Y');
?>
</em></p>
</body>
</html>
{reply.php}
<!--
Student Name: Aditya Bansal
Student Id: 0825487
Class: MIT439_004
Assignment: 3
Date: 31 January 2024
URL: https://w24aer.scweb.ca/MIT439/week3/reply.php
-->
<!DOCTYPE html>
<html><head><title>Process Registration Form</title></head>
<body><h2>ABC Web Site Registration Reply Page</h2>
<?php
$username = $_POST['username'];
$region = $_POST['region'];
if (empty($username)) {
echo "You did not enter a username.<br />";
echo "Please return to the form and re-enter your information";
} else {
echo "<h3>Your information has been processed.</h3>";
echo "Thank you $username<br />";
echo "From the lovely region of : $region";}
?>
</body>
</html>