Easy-to-follow video tutorials help you learn software, creative, and business skills.Become a member
We have now planned out our login process, figured out what pages need to be created, what scripts need ot be written in PHP. Now, it's a matter of actually building that piece and the people who maintain the website for Scuba2U have created a login form for us. It's just the front end piece, there's no programming of any kind. And it's been passed off to us to look over and add the back end piece.
And this is quite often what ends up happening. It's kind of the distinction between the designer. It will create the forum to match the website and the developer who actually gets the forum functioning. Here is our Scuba2U Login form. Now, I'm going to close up a couple of things here. Well actually, just one I'll keep the properties open for you. I'm going to close up this Insert bar just so I have more space available here in order to show you this piece. Now, within the Properties area, I can get some information about this form, or I can certainly go into Code View.
Either way, within our form,we have the Login form itself. Now, I'm not sure if we want to use a single word for Login, or if we would rather put a space in here and make in a separate word. I think I will make in a separate word, minor details here. So, we'll make that look a little bit nicer. The other thing we want to do is add the title, so this is going to be the Scuba2U Login form up in our Title area right now.
Now, you can see these Form field are two different sizes, and that's fine. However, we as the developers are setting up the database piece so we need to make sure that these two match and the information the user can put into these two match up with our database. I will go out to the Dreamweaver Databases tab. The Login table within the Database's tab is what we need to take a look at. So, open up your Login area, and this is all of the data contained within our Login.
So, on this form, email is actually representing our username within the database. Now, if I double-click on that down in the Properties area, and it just makes it a little bit easier for me to show this to you instead of Code View. Within the Properties area, I can see the Properties for this field. Now, if you notice our username accepts 50 characters. And right now, within our Email field, we are accepting 60.
I certainly cannot allow the user to add 60 characters if my Username field only allows 50. Every time they try and use this, they will get a database error. So, I'm going to limit this to 50, the same number of characters as my username in the database. The password, we need to do the same thing. Now, our Password field here is set up correctly as a password. So, we wanted to double check that. However, let's check the length.
Character width of 10, maximum characters 10. In our database, we're allowing 15. So, what I'm going to do is I'm not going to change this character width necessarily. Because it'll make it look to the user like we need a really long password for them, but I am going to change maximum characters and make sure they cannot enter more than 15. So, our form is set up now, looks good from the back end side. We're making sure that these match up with our database data, then it's a matter of activating this Login form.
And when they click the Submit button, we want to make sure that they can authenticate correctly. Now, the word Submit is not the nicest, so I'm going to change that to say Login. And to do that, I change the value down here. So, I selected that button and within the Properties area, I'm going to have it say Login. Make sure this says Submit Form within this area, and there is our login.
Let's take a look at this in the browser. I just want to make sure it looks okay for the user. It looks good. We do have a little bit of extra area here, but that's fine. This square is being caused by a field set HTML tag, and the text within that box is a part of the Legend tag. And I find a lot of people are not familiar with that tag. So, let me show you that piece before we move on. Within Code View, I will see right after the Login form, here is that extra paragraph of space, which is fine.
I have a field set and my form is located completely within the field set. So, there's my opening field set. Here is my closing field set. And notice our form tag is within that. I'll move this over so it makes a little more sense. So, here's our form. Here's our field set, and directly under the Field Set tag, we have our Legend tag. This is the information that goes on that field set.
Now that field set does look slightly different in different browsers, I'll save my changes. And in Internet Explorer, the field set gets a little bit of a curve on the edges, and it is a lighter grey. Within Firefox, it's a little bit different. And if you look at in Chrome and Safari, each one has subtle difference between them. So, I'll open it back up in Firefox here. You can see it's a little bit darker, and it's square. In Internet Explorer, it's lighter.
Also, where the actual words fall is just slightly different. So subtle distinctions, I'm not going to be concerned about that piece. But our form looks ready to go. We have our Login form. We just need to create the Action page, and then link this form to our Action page. We aren't going to worry about that. Dreamweaver will actually set up our action for us once we use Dreamweaver to create and authenticate our Login area.
So, our Login form is all set to go. We've compared it to the database. Now, the last piece of information we need to add to this form is making sure that the user has to put in correct information. So, we'll have to look at some form validation for this form. So, we'll move on to working with some form validation. And we may want to set up this form a little bit differently in order to add the form validation piece.
Get unlimited access to all courses for just $25/month.Become a member
82 Video lessons · 101175 Viewers
61 Video lessons · 87929 Viewers
71 Video lessons · 71811 Viewers
56 Video lessons · 103672 Viewers
Access exercise files from a button right under the course name.
Search within course videos and transcripts, and jump right to the results.
Remove icons showing you already watched videos if you want to start over.
Make the video wide, narrow, full-screen, or pop the player out of the page into its own window.
Click on text in the transcript to jump to that spot in the video. As the video plays, the relevant spot in the transcript will be highlighted.
Your file was successfully uploaded.