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

You are required to create 2 web pages that does the following: 1) Page 1: HTML

ID: 3686087 • Letter: Y

Question

You are required to create 2 web pages that does the following:

1) Page 1: HTML Page that contains a form that collect information from user and pass it on to the next page.

a) You need to validate user information (String, number, email,..)

b) Validation can be made on the same page or on the next page.

2) Page 2: PHP page that will receive data from previous page.

a) The page need to add the received information to a list in the same page.

b) You can either use cookies, arrays or database to store

Explanation / Answer

first.html

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
</head>

<body>
<table width="328" border="1">
<tr>
<td width="155"><label>Name</label>&nbsp;</td>
<td width="157"><form id="form1" name="form1" method="post" action="second.php">
<label>
<input name="t1" type="text" id="t1" />
</label>
  
</td>
</tr>
<tr>
<td>Password</td>
<td><label>
<input name="t2" type="password" id="t2" />
</label></td>
</tr>
<tr>
<td colspan="2"><label>
<input type="submit" name="Submit" value="Submit" />
</label></td>
</tr>
</form>
</table>

</body>
</html>

second.php

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
</head>

<body>
<?php
   $un=$_POST['t1'];
   $pw=$_POST['t2'];
   if ($pw=="RAJSAP")
   {
       echo "HELLO ".$un." LOGIN IS CORRECT";
   }
   else
   {
       echo "SORRY ! PL. TRY AGAIN!!!";
   }
?>

</body>
</html>

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