Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
Siddhesh Menon authored Feb 7, 2019
0 parents commit e9b99e7
Show file tree
Hide file tree
Showing 11 changed files with 842 additions and 0 deletions.
113 changes: 113 additions & 0 deletions Design.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,113 @@
body
{
position: fixed;
width: 99%;
}
header,footer
{
padding: 1em;
color:blue;
background-color:#015484;
clear: left;
text-align: center;
font-family: georgia;
}
p
{
font-size:'150%';
}
img
{
height:75px;
width:130px;
padding-left: 2px;
padding-top: 2px;
padding-bottom: 2px;
}
article
{
margin-left: 170px;
border-left: 1px solid gray;
padding: 0.5em;
overflow: hidden;
}
div.container
{
width: 100%;
border: 1px solid gray;
}
h1
{
color:#68376E;
font-family:georgia;
}
nav
{
float: left;
max-width: 200px;
margin: 0;
}
iframe
{
width:1420px;
height:600px;
padding-right: 30px;
padding-left: 30px;
border:none;
}
div
{

float:center;
}

table
{
border:3px solid #015484;
font-family:times;
}
.button
{
display: inline-block;
border-radius: 4px;
background-color: #015484;
border: none;
color: #FFFFFF;
text-align: center;
font-size: 18px;
padding: 20px;
width: 120px;
transition: all 0.5s;
cursor: pointer;
margin: 5px;
border: 2px solid #000066;
}

.button span
{
cursor: pointer;
display: inline-block;
position: relative;
transition: 0.5s;
}

.button span:after
{
content: '\00bb';
position: absolute;
opacity: 0;
top: 0;
right: -15px;
transition: 0.5s;
}

.button:hover span
{
padding-right: 15px;
}

.button:hover span:after
{
opacity: 1;
right: 0;
}
72 changes: 72 additions & 0 deletions Myform.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
<!DOCTYPE html>
<html>
<head>
<title>Return Form</title>
<link rel="stylesheet" type="text/css" href="css.css">


<script type="text/javascript">

function check()
{
if((document.f1.name.value=="")||(document.f1.ISBN_no.value=="")||(document.f1.bookID.value=="")||(document.f1.bookname.value=="")||(document.f1.IssueDate.value=="")||(document.f1.ReturnDate.value=="")||(document.f1.FineAmount.value==""))
{
alert("Please enter complete details")
document.f1.name.focus()
}
}

</script>

</head>
<body>
<h2 align="center">Return Form</h2>
<form name='f1' method = "POST">
<table cellpadding="10px" align="center">
<tr>
<td>Name:</td>
<td><input type = "text" name = "name" size="50">
</td>
</tr>

<tr>
<td>ISBN: </td>
<td><input type = "text" name = "ISBN_no" size="50%">
</td>
</tr>

<tr>
<td>Book name: </td>
<td><input type = "text" name = "bookname" size="50%">
</td>
</tr>


<tr>
<td>Book Id: </td>
<td><input type = "text" name = "bookID" size="50%">
</td>
</tr>

<tr>
<td>IssueDate: </td>
<td><input type = 'text' name = "IssueDate" size="50%">
</td>
</tr>

<tr>
<td>Return Date: </td>
<td><input name = "ReturnDate" size="50%">
</td>
</tr>

<tr>
<td>Fine Amount: </td>
<td><input type = "int" name = "FineAmount" size="50%">
</td>
</tr>

</table>
<center><input type = "submit" class="button button1" name = "submit" value = "Submit" onclick="check()"></center>
</body>
</html>
72 changes: 72 additions & 0 deletions Myform.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
<!DOCTYPE html>
<html>
<head>
<title>Return Form</title>
<link rel="stylesheet" type="text/css" href="css.css">
<script type="text/javascript">
function check()
{
if((document.f1.name.value=="")||(document.f1.ISBN_no.value=="")||(document.f1.bookID.value=="")||(document.f1.bookname.value=="")||(document.f1.IssueDate.value=="")||(document.f1.ReturnDate.value=="")||(document.f1.FineAmount.value==""))
{
alert("Please enter complete details")
document.f1.name.focus()
}
}
</script>
</head>
<body>
<h2 align="center">Return Form</h2>
<form name='f1' method = "POST">
<table cellpadding="10px" align="center">
<tr>
<td>Name:</td>
<td><input type = "text" name = "name" size="50">
</td>
</tr>
<tr>
<td>ISBN: </td>
<td><input type = "text" name = "ISBN_no" size="50%">
</td>
</tr>
<tr>
<td>Book name: </td>
<td><input type = "text" name = "bookname" size="50%">
</td>
</tr>
<tr>
<td>Book Id: </td>
<td><input type = "text" name = "bookID" size="50%">
</td>
</tr>
<tr>
<td>IssueDate: </td>
<td><input type = 'text' name = "IssueDate" size="50%">
</td>
</tr>
<tr>
<td>Return Date: </td>
<td><input name = "ReturnDate" size="50%">
</td>
</tr>
<tr>
<td>Fine Amount: </td>
<td><input type = "int" name = "FineAmount" size="50%">
</td>
</tr>
</table>
<center><input type = "submit" class="button button1" name = "submit" value = "Submit" onclick="check()"></center>
</body>
</html>
118 changes: 118 additions & 0 deletions SellForm.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
<html>
<head>
<link rel="stylesheet" type="text/css" href="css.css">
</head>
<body>
<h2 align="center"> Selling Form</h2>
<center>
<?php
// define variables and set to empty values
$nameErr = $emailErr = $genderErr = $bookIDErr = $booktypeErr = "";
$name = $email = $gender = $bookID = $bookname = $booktype = "";

if ($_SERVER["REQUEST_METHOD"] == "POST") {
if (empty($_POST["name"])) {
$nameErr = "Name is required";
}else {
$name = test_input($_POST["name"]);
}

if (empty($_POST["email"])) {
$emailErr = "Email is required";
}else {
$email = test_input($_POST["email"]);

// check if e-mail address is well-formed
if (!filter_var($email, FILTER_VALIDATE_EMAIL)) {
$emailErr = "Invalid email format";
}
}

if (empty($_POST["gender"])) {
$genderErr = "Gender is required";
}else {
$gender = test_input($_POST["gender"]);
}

if (empty($_POST["bookID"])) {
$bookIDErr = "BookID is required";
}else {
$bookID = test_input($_POST["bookID"]);
}

if (empty($_POST["bookname"])) {
$bookname = "";
}else {
$bookname = test_input($_POST["bookname"]);
}

if (empty($_POST["booktype"])) {
$booktypeErr = "Booktype is required";
}else {
$booktype = test_input($_POST["booktype"]);
}
}

function test_input($data) {
$data = trim($data);
$data = htmlspecialchars($data);
return $data;
}
?>
<form method = "POST" action = "Selling.php">
<table cellpadding="10px">
<tr>
<td>Name:</td>
<td><input type = "text" name = "name" size="50">
<span class = "error">* <?php echo $nameErr;?></span>
</td>
</tr>

<tr>
<td>E-mail: </td>
<td><input type = "text" name = "email" size="50%">
<span class = "error">* <?php echo $emailErr;?></span>
</td>
</tr>

<tr>
<td>Gender:</td>
<td>
<input type="radio" name="gender" value= "Female"> Female
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<input type = "radio" name = "gender" value = "Male">Male
<span class = "error">* <?php echo $genderErr;?></span>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;
BookID: <input type= "text" name= "bookID" size="10%">
<span class = "error">* <?php echo $bookIDErr;?></span>
</td>
</tr>

<tr>
<td>Book Name:</td>
<td> <input type = "text" name = "bookname" size="29%">
Book Type:
<select name = "booktype">
<option></option>
<option value = "Fiction">Fiction </option>
<option value = "Biography">Biography </option>
<option value = "Travel">Travel </option>
<option value = "Science">Science </option>
<option value = "Others">Others </option>
</select>
<span class = "error">* <?php echo $booktypeErr;?></span>
</td>
</tr></table>

<center>
<p>&nbsp;</p>


<input type = "submit" class=button name = "submit" value = "Submit">
</center>

</form>
</center>
</body>
</html>
Loading

0 comments on commit e9b99e7

Please sign in to comment.