Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

ITEC 3830 Spring 2017 Final Project Specifications This project is due by May 1,

ID: 3827109 • Letter: I

Question

ITEC 3830 Spring 2017 Final Project Specifications This project is due by May 1, 2017 at 6:00 p.m. No work is accepted after May 1, 2017 at 6:00 p.m. No exceptions. Create table database Create two forma Create separate header and footer fi Create a separate style sheet parate ript put for Form 1 inputs data into the table you created. st fo put fields. It of those input fields ropdown box with least th All other input fields must have form handling validation. At the very least you must check to see that fields are neither empty nor null. Users should not be able to submit a form with empty or null fields. More sophisticated validation is optional must have a header and footer, These files must be called paretely Form separate databa ust be fommatted parate style sheet. Form 2 output form Form 2 outputs all deta from the table you created Form 2 must output at least four database fields. It may output more. ust ha heade d footer ust be parat te databa script. gt be formatted sheet. parate Et Attachment (Extra Credi For extra credit add this functionality to Forms and 2 Tabl Include ttached document Form 1: Allow the user to upload either a document or an image into the table you created. Form 2: Output the ettachment Optional: Intermediate Webpage If you chose to process either of your forms through an intemediate web that page must also call header and footer files separately. This page must also be fommatted wia a parate style sheet. page, Not opti These Fomms MUST work Your forms must work. They must be functional. Ihave to be able to see form 1 enter data into a database. Subsequently, 1have to see form 2 retrieve that same data from the database, format it and present it on a webpage.

Explanation / Answer

index.php

</html>
<!DOCTYPE>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Insert form</title>
<link type="text/css" media="all" rel="stylesheet" href="styles.css">
</head>
<body>
<header>
<h1>Welcome to our Site</h1>
</header>

<div class="main">
<div class= "container">
<aside class="leftAside">
<form action="" method="post" name="insertform">
<p>
<label for="name" id="preinput"> USER NAME : </label>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<input type="text" name="username" required placeholder="Enter your name" id="inputid"/>
</p>
<p>
<label for="email" id="preinput"> EMAIL ID : </label>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<input type="email" name="usermail" required placeholder="Enter your Email" id="inputid" />
</p>
<p>
<label for="mobile" id="preinput"> MOBILE NUMBER : </label>
<input type="text" name="usermobile" required placeholder="Enter your mobile number"
id="inputid" />
</p>
<p>
<label for="mobile" id="preinput">Department : </label>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<select name="subject">
    <option value="Computer">Computer</option>
    <option value="Maths">Maths</option>
    <option value="Physics">Physics</option>
</select>
</p>
<p>
<input type="submit" name="send" value="Submit" id="inputid1" />
</p>
</form>
</aside>
</div>
</div>
<?php
if(isset($_POST['send'])!="")
//print_r($_POST);exit;
{
   include("db.php");
$username=mysql_real_escape_string($_POST['username']);
$usermail=mysql_real_escape_string($_POST['usermail']);
$usermobile=mysql_real_escape_string($_POST['usermobile']);
$subject=mysql_real_escape_string($_POST['subject']);
$update=mysql_query("INSERT INTO user(name,email,mobile,subject)VALUES ('$username','$usermail','$usermobile','$subject')");
  
if($update)
{
$msg="Successfully Inserted!!";
echo "<script type='text/javascript'>alert('$msg');</script>";
header('Location:view.php');
}
else
{
$errormsg="Something went wrong, Try again";
echo "<script type='text/javascript'>alert('$errormsg');</script>";
}
}
?>
<footer>
<p>Created by Bhava shankar.</p>
<a href="mailto:email@yahoo.com">Bhavashankar88@yahoo.com</a>
</footer>

</body>
</html>

view.php

<!DOCTYPE html>
<html>
<head>
<title>Result</title>
<link type="text/css" media="all" rel="stylesheet" href="styles.css">
</head>
<body>
<header>
<h1>Your Result</h1>
</header>
<div class="main">
<div class= "container">
<aside class="leftAside">
<?php
include('db.php');
$select=mysql_query("SELECT * FROM user order by id desc");
echo "<table border='1'>
<tr>
<th>Name</th>
<th>Email</th>
<th>Mobile</th>
<th>subject</th>
</tr>";
while($userrow=mysql_fetch_array($select)){
echo "<tr>";
echo "<td>" . $userrow['name'] . "</td>";
echo "<td>" . $userrow['email'] . "</td>";
echo "<td>" . $userrow['mobile'] . "</td>";
echo "<td>" . $userrow['subject'] . "</td>";
echo "</tr>";
}
echo "</table>";

?>
</aside>
</div>
</div>
<footer>
<p>Created by Bhava Shankar.</p>
<a href="mailto:email@yahoo.com">bhavashankar88@yahoo.com/a>
</footer>
</body>
</html>

Style.Css

body
{margin: 0 auto; font-family:black,Verdana,Arial,Helvetica,sans-serif;font-size:12px;background:#042841;color:black;}
header{padding:0;width: 960px;height: 100px;margin: 0 auto;align-content:center;background: #d8e6b3;z-index:100;}
footer{padding:0;width: 960px;height: 100px;margin: 0 auto;align-content:center;background: #d8e6b3;float: left;margin-left: 203px;}
footer p{padding: 12px;}
footer a{padding: 12px;}
aside a:hover{color:#CC9900;}
.main{width:958px; height : 375px;margin: 0 auto; color: #FFFFFF;border: 1px solid red;background-color: #f04242;}
h1{text-align:center;padding: 30px;}
.container{width:400; color: #FFFFFF;margin: 0 auto;}
.content { font-size:10px; color: #CC9900; }

DB.php

<?php
ob_start();
define('DB_SERVER', 'localhost');
define('DB_USERNAME', 'root');
define('DB_PASSWORD', '');
define('DB_DATABASE', 'bhava');
$connection = mysql_connect(DB_SERVER, DB_USERNAME, DB_PASSWORD) or die(mysql_error());
$database = mysql_select_db(DB_DATABASE) or die(mysql_error());
?>

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote