I am taking an Introductory to Web Programming class and I am looking for ideas and/or link referrals on how to implement a login page for a
shopping website that my classmates and I are developing. One of my classmates
has taken the task of developing a sql database that will hold user profiles and
I would like to develop
1) a simple log in page that checks to see if a user and their password exists in the database
2) if the user doesn't have an account then have their registration information inserted and stored into the database for future logins.
I was thinking of having HTML pages similar to examples in my book which I am enclosing below,
however it was suggested by that it is better off I have PHP do this.
If someone could point me in the right direction I would greatly appreciate it, thank you.
M_M.
Enclosure (2)
An updated version of my code to date:
This is the login page
<?xml version = "1.0" encoding = "utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns = "http://www.w3.org/1999/xhtml">
<head>
<title> J.A.D. Computing Login Page </title>
<!-- This page will serve as the login page for the website -->
<!-- If a user has an account they will enter their login name and pass -->
<!-- word, and if they don't they have the option to register for one -->
<!-- It should be noted that only registered users can access the entire -->
<!-- website. -->
</head>
<body>
<h1> Welcome to JAD Computing </h1>
<h4> Please Log in Below </h4>
<form method = "post" action = " " >
<p>
User Name <input type ="text" name="UserName" size="25" id="UserName" />
<br /> Password <input type ="password" name="password" size="10" id="Password" />
<br /> <input type ="submit" value = "Submit" /> <input type ="reset" value ="Reset" />
<br />
</p>
<p>
<br />
<br />
</p>
</form>
<p>
<a href="registration.html"> Don't have an account? Register here! </a>
</p>
<p>
<a href="http://validator.w3.org/check?uri=referer"><img
src="http://www.w3.org/Icons/valid-xhtml10"
alt="Valid XHTML 1.0 Strict" height="31" width="88" /></a>
</p>
</body>
</html>
This below is the registration page (which is incomplete)
<?xml version = "1.0" encoding = "utf-8"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns = "http://www.w3.org/1999/xhtml"> <head> <title> JAD Computing Registration </title> </head> <body> <h1> Registration Form </h1> <p> Please fill this out to create an account with us. </p> <form method = "post" action = " "> <p> <input type = "hidden" name = "recipient" value = " " /> <input type = "hidden" name = "subject" value = "New User Registration" /> <input type = "hidden" name = "redirect" value = "portal.html" /> <!--After completion the user will be sent to the sites portal --> <p> <label> E-mail: <input name = "email" type = "text" size = "25" /> </label> </p> <p> <label> First Name: <input name = "First Name" type = "text" size = "25" /> </label> </p> <p> <label> Last Name: <input name = "First Name" type = "text" size = "25" /> </label> </p> <p> <label> Address 1: <input name = "Address 1" type = "text" size = "75" /> </label> </p> <p> <label> Address 2: <input name = "Address 2" type = "text" size = "75" /> </label> </p> <p> <label> City/Town/Village: <input name = "Locality" type = "tesxt" size = "75" /> </label> </p> <p> <label> State: <select name = "state"> <option selected = "selected"> </option> <option>
Also for reference this is the book we are using http://www.amazon.co...m/dp/0131752421
Thank you again!

New Topic/Question
Reply



MultiQuote







|