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

5. Don\'t do anything with “add.php” – this will happen in an exercise! code for

ID: 3808564 • Letter: 5

Question

5. Don't do anything with “add.php” – this will happen in an exercise!

code for project 1 :

<!DOCTYPE html>
<html>
<head>
<title>Argo Address - Keep your addresses safe</title>
   <meta charset="UTF-8">
   <style type="text/css">
      
       body { background:teal; color:black }
       h1 { font-family:Lucida,Arial,sans-serif;
       font-weight:bold }
   p{ color:black; text-align:left }
   .important { color:black; font-weight:bold }
       body { text-align; center; margin: 0px; padding: 0px }
       #wrapper { width: 1000px; height: 1000px; margin-left: auto; margin-right: auto }
  
   </style>
</head>
<body>

<div id="wrapper">
<h1>Argo Address</h1>
<img src="http://uwf.edu/media/university-of-west-florida/style-assets/newhomepage/images/UWF-Athletics_Logo.svg" width="220" height="277" alt="Argo Logo">

<p> Argo Address is an application that allows you to simply keep all your contacts and valuable information into one safe location. This state of the art application will enable you to add addresses, logout, edit, install or remove features and quickly look up anyones address information with a simple quick search. ENJOY!</p>

<p> To begin create an account or log in.</p>
<p class="important" >Create an account if you do not already have one:</p>

   <form>
   <p> User Name: <input type="" Name="" value=""> </p>
   <p> Password: <input type="" Name="" value=""> </p>
   <p> Repeat Password: <input type="" Name="" value=""> </p>
   <input type="submit" value="Submit">
   <form>
  
<p class="important" > Please log into your account: </P>
   <form>
   <p> User Name: <input type="" Name="" value=""> </p>
   <p> Password: <input type="" Name="" value=""></p>
   <input type="submit" value="Submit">
   <br>
   </form>
  
</body>
</html>

index. validate Php Success menu. PhP add-PhP Sho Php 1. Take your login form from Project 1, make sure it's named "index.html" and connect it to a php page "validate.php" (not the "Create account" form, just the "Login form". 2. This php page has to validate the input and in case of success display a link to the page "menu.php" Since you don't know lyet) how to get to the stored data in the user table, you have to "fake" the validation let it succeed, but provide a test, that leads back to index.html in case of a failure

Explanation / Answer

index.html

<!DOCTYPE html>
<html>
<head>
<title>Argo Address - Keep your addresses safe</title>
    <meta charset="UTF-8">
    <style type="text/css">
      
        body { background:teal; color:black }
        h1 { font-family:Lucida,Arial,sans-serif;
        font-weight:bold }
        p{ color:black; text-align:left }
        .important { color:black; font-weight:bold }
        body { text-align; center; margin: 0px; padding: 0px }
        #wrapper { width: 1000px; height: 1000px; margin-left: auto; margin-right: auto }
      
    </style>
</head>
<body>

<div id="wrapper">
<h1>Argo Address</h1>
<img src="http://uwf.edu/media/university-of-west-florida/style-assets/newhomepage/images/UWF-Athletics_Logo.svg" width="220" height="277" alt="Argo Logo">

<p> Argo Address is an application that allows you to simply keep all your contacts and valuable information into one safe location. This state of the art application will enable you to add addresses, logout, edit, install or remove features and quickly look up anyones address information with a simple quick search. ENJOY!</p>

<p class="important" > Please log into your account: </P>
    <form action="" method="POST" >
    <p> User Name: <input type="text" Name="username" value=""> </p>
    <p> Password: <input type="password" Name="password" value=""></p>
    <input type="submit" value="Submit">
    <br>
    </form>
  
   </body>
</html>

validate.php

<?php
if(isset($_POST["username"])&&($_POST["password"])){
$username=$_POST['username'];
$password=$_POST['password'];

$con=mysql_connect('localhost','root','')or die(mysql_error());
mysql_select_db('database_name') or die("cannot select db");

//get data from db
//$db_password is password of the entered username from the database
if($password==$db_password )
{
   echo "Hello, $username";
   echo "<a href="menu.php">Go to menu</a>"
}
else
{
   header("Location:index.html");
}
?>

menu.php

<?php
echo "Please Select:";
echo "<a href="show.php">Show Contacts</a>";
echo "<a href="add.php">Add Contacts</a>";
echo "<a href="index.html">Logout</a>";
?>


show.php

<?php
$con=mysql_connect('localhost','root','')or die(mysql_error());
mysql_select_db('database_name') or die("cannot select db");
//get the data from the db
echo "<table border="1">";
echo"<tr><th>Name</th><th>Email></th><th>Phone</th></tr>";
echo"<tr><td>"Get the data from the db"</td><td>"Get the data from the db"</td><td>"Get the data from the db"</td></tr>";
echo"<tr><td>"Get the data from the db"</td><td>"Get the data from the db"</td><td>"Get the data from the db"</td></tr>";
echo"<tr><td>"Get the data from the db"</td><td>"Get the data from the db"</td><td>"Get the data from the db"</td></tr>";
echo "<td>";
echo"< d>"
echo"</tr>";
echo "</table>";
?>

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