Notes![what is notes.io? What is notes.io?](/theme/images/whatisnotesio.png)
![]() ![]() Notes - notes.io |
<!DOCTYPE html>
<html lang="en">
<head>
<title>Web Applications and Technologies</title>
<link type="text/css" rel="stylesheet" href="all.css" />
</head>
<body>
<header>Bikash Gurung 77181439</header>
<section id="container">
<h1>Processing Input from HTML Forms</h1>
<h2>Login Form using GET</h2>
<form method="POST" action="">
<fieldset>
<legend>
Login
</legend>
<label for="email">Email: </label>
<input type="text" name="txtEmail"/>
<br/>
<label for="passwd">Password: </label>
<input type="password" name="txtPass"/><br />
<input type="submit" value="Submit" name="loginSubmit" />
<input type="reset" value="Clear" />
<?php
error_reporting(E_ERROR);
echo "<hr>";
echo "<hr>";
$email = $_POST['txtEmail'];
$pass = $_POST['txtPass'];
if(isset($_POST['loginSubmit'])){
echo "Email: $email Password: $pass</br>";
}else{
echo "Invalid input</br>";
}
?>
</fieldset>
</form>
<form method="POST" action="">
<fieldset>
<legend>Comments</legend>
<label for="email">Email: </label>
<input type="text" name="email" value="" /><br />
<textarea rows="4" cols="50" name="commnt" placeholder="comment"></textarea><br />
<label for="">Click to Confirm: </label>
<input type="checkbox" name="Confirm" value="agree"><br />
<input type="submit" value="Submit" name="submit"/>
<input type="reset" value="Clear"/>
<?php
error_reporting(E_ERROR);
echo "<hr>";
echo "<hr>";
$commentEmail = $_POST['email'];
$comment = $_POST['commnt'];
if (isset($_POST['Confirm'])){
$confirm='Agreed</br>';
}else{
$confirm='Not Agreed</br>';
}
if(isset($_POST['submit'])){
if(!empty($commentEmail)){
if (filter_var($commentEmail, FILTER_VALIDATE_EMAIL)){
echo "Email: $commentEmail</br>";
echo "Comments: $comment</br>";
echo "Confirm: $confirm";
}
else{
echo("$commentEmail is not a valid email address");
}
}
else{
echo "Email must not be empty";
}
}
?>
</fieldset>
</form>
<tr><form method="POST" action="">
<h3>Tax Calculator</h3>
<fieldset>
<legend>Without Tax calculator</legend>
<label> After Tax Price: </label>
<input type ="text" name ="rs"/>
<label> Tax Rate: </label>
<input type ="text" name ="rt"/>
<input type ="submit" name ="submit" value ="Submit"/>
<input type="reset" value="Clear"/>
<br/>
<?php
error_reporting(E_ERROR);
$Price = $_POST['rs'];
$Rate = $_POST['rt'];
if(isset($_POST['Submit'])){
if(filter_var($Price, FILTER_VALIDATE_FLOAT)){
$tPrice = $_POST['rs'];
}
else if(filter_var($taxPrice, FILTER_VALIDATE_INT)){
$tPrice = $_POST['rs'];
}
else{
echo "Input is not valid.";
}
if(filter_var($Rate, FILTER_VALIDATE_FLOAT)){
$tRate = $_POST['rt'];
}
else if(filter_var($Rate, FILTER_VALIDATE_INT)){
$tRate = $_POST['rt'];
}
else{
echo "Input is not valid.";
}
}
echo"</br>";
echo "<hr>";
$beforeTax = (100 * $Price) / (100 + $Rate);
echo "<b>Before Tax: </b>" .number_format($beforeTax, 2);
?>
</fieldset>
</form>
<form>
<h1>Passing Data Appended to an URL</h1>
<h2>Pick a category</h2>
<a href="week5.php?cat=Films">Films</a>
<a href=" week5.php?cat=Books">Books</a>
<a href=" week5.php?cat=Music">Music</a>
<?php
error_reporting(E_ERROR);
$cat = $_GET['cat'];
echo "<br/>";
echo "<h2><i>" .$cat. "</i></h2>";
?>
</form>
</section>
<footer>
<small> <a href="../index.html">Home</a></small>
</footer>
</body>
</html>
![]() |
Notes is a web-based application for online taking notes. You can take your notes and share with others people. If you like taking long notes, notes.io is designed for you. To date, over 8,000,000,000+ notes created and continuing...
With notes.io;
- * You can take a note from anywhere and any device with internet connection.
- * You can share the notes in social platforms (YouTube, Facebook, Twitter, instagram etc.).
- * You can quickly share your contents without website, blog and e-mail.
- * You don't need to create any Account to share a note. As you wish you can use quick, easy and best shortened notes with sms, websites, e-mail, or messaging services (WhatsApp, iMessage, Telegram, Signal).
- * Notes.io has fabulous infrastructure design for a short link and allows you to share the note as an easy and understandable link.
Fast: Notes.io is built for speed and performance. You can take a notes quickly and browse your archive.
Easy: Notes.io doesn’t require installation. Just write and share note!
Short: Notes.io’s url just 8 character. You’ll get shorten link of your note when you want to share. (Ex: notes.io/q )
Free: Notes.io works for 14 years and has been free since the day it was started.
You immediately create your first note and start sharing with the ones you wish. If you want to contact us, you can use the following communication channels;
Email: [email protected]
Twitter: http://twitter.com/notesio
Instagram: http://instagram.com/notes.io
Facebook: http://facebook.com/notesio
Regards;
Notes.io Team