11:06:58 Hello, today we're going to talk about something. That is not a central focus. Of the database class. 11:07:08 It is covered more appropriately in advanced web design class, but some of you will want to be using HTML. 11:07:17 In your projects. So I wanted to review this in case anyone was concerned the exam questions are not going to focus on HTML. 11:07:28 Or PHP for this class. But if you wish to use them in your project, I am very happy to do it with you. 11:07:37 This presentation is about using HTML. To call PHP. It's okay with me if you watch the PHP presentation. 11:07:49 First. Now, I do have some examples. The Count. 11:07:56 Case study. 11:07:59 Does it actually have a little HTML, little PHP, but that's. A different approach than people usually take. 11:08:07 You can look at it. I don't mind. But it's like embedding. The results of PHP code in an HTML page, which is different. 11:08:17 Then what is normally done? So I want to start looking at the driftless. Healthcare podcast, which 11:08:28 Is Hey, fairly come, I don't know if it's a hard example, but it's a fairly extensive example. 11:08:40 And 11:08:42 There's a some HTML that I'm not going to talk about index menu 10. 11:08:50 Where we have a dividable sub menu. And I'm not going to talk about the HTML in button 3. 11:09:00 You're welcome to look at it. I'm going to take a Couple of examples. 11:09:06 Of HTML that calls PHP. Started with title search. Just to show you. 11:09:17 What it can look like. 11:09:22 So this is an HTML. 11:09:29 File that uses forms. That's what I'm really trying to talk about today. 11:09:38 To call. 11:09:42 PHP to manipulate the database. Now, the usual webp. Page stuff is all there. 11:09:54 Now, in this, this is a fairly simple. Straightforward form or like look at how long the body is. 11:10:04 When you have a form, you put it in. The form of form. And close form. And there are more than one methods to do with the method I do it is I use the get method. 11:10:19 And my action. 11:10:24 Says whatever it is that that PHP file tells me to do. That's what I'm going to do. 11:10:37 Now, I have to give, I choose to give information. To the PHP file. 11:10:46 So. I label. 11:10:54 One part of it, what's it? 11:10:58 And another part of it. 11:11:01 Part of title. So I have a name. ID. Your disk. 11:11:13 So you wanna match these. Good. In fact, all. I'll cheat a little bit. 11:11:30 I'm really not talking about the 11:11:37 PHP here. 11:11:40 But you notice in the PHP. We talk about part of title. For example. 11:12:00 There's the part of title. Okay. So. Whatever is put in that text area, which has 20 columns. 11:12:11 Comes part of title. 11:12:15 And. 11:12:22 And let's see. 11:12:26 Oopsets are wrong. 11:12:36 Actually, maybe that's the only thing here, but anyway. Part of title is the important thing. 11:12:46 We're searching for title after all. So. In terms of a form. You say this is the PHP. 11:12:56 File I want to do. I give the name. Of the information that I wanna, I'm interested in. 11:13:08 And I say the input type is submit. And that means when I. Click on the submit. 11:13:18 It will call it. Now. 11:13:26 I'm not running it off of the 11:13:31 Actual web page at this moment. Both. 11:13:37 But if I'm looking for things. That are part of the title, I type. That and I click submit. 11:13:46 And it calls and passes that information. To the PHP file. 11:13:56 Actually. That's a long dress list. 11:14:02 On the actual. Web page. This is the functional version. I click AIDS and I submit it. 11:14:13 Oops. 11:14:17 Maybe that wasn't the functional version. 11:14:26 I might have changed. Permissions all have to fix that later. Okay. But you get the hopefully get the idea. 11:18:42 Took a little time out. 11:18:46 2 fix that little glitch. 11:18:52 The glitch was. Somehow I had changed. The permissions. So I had to reset the password. 11:19:03 It's happened to be before and I'm not sure why. But. Now if I click on the AIDS. 11:19:09 It finds. 11:19:13 Well, it finds the anti-inflammatories. Notice. The AIDS is there. 11:19:21 Oh well, an extraneous result. But I just wanted to give you to see that working. Yeah. 11:19:36 Sorry, that's 11:19:45 Anyway. Trying to come. 11:19:51 Back to where I was. 11:19:56 I have too many things open. Yeah, that title search. Embedded the form. For 11:20:08 My next trick, I'll. Do a more full look at the title. Search PHP. 11:20:17 In the next presentation. I want to look at the description search which is Similar, but all. Look at it anyway. 11:20:36 Just description search. 11:20:42 I say in words, type part that you're instructing for, but the critical part is the form. 11:20:55 And again, I specify that the action is. 11:21:01 Who go do the 11:21:04 PHP file associated. Oh, that's interesting. 11:21:16 I never realized. I had that as a mistake. 11:21:29 I went to the wrong PHP file. 11:21:37 Which shows that I was not doing full test farming, testing. Now. If my description searched at HTML is in the Lemuria. 11:21:50 Thing. I could 11:21:55 Delete that part. And just go straight to the local description search. 11:22:01 Okay, but anyway, then I've got part of title. It's what looking for. Okay, now I will. 11:22:17 And another one I have. Is wordy 3. Which you don't need to know worry about the. 11:22:28 HTML part of the example. But. 11:22:35 This. Has a pre set list of words. In a table. 11:22:46 And in that table. 11:22:57 We have. 11:23:00 Many many boxes. So this is a checkbox. And the idea associated with the checkbox is Word 1 1. 11:23:10 And I guess like just to make sure. Everybody's on the same page I call the ID the name. 11:23:17 In the label all word 1 one. The value is athlete. 11:23:26 Now. 11:23:30 So I have a bunch of words and I'll show you the form in a minute. This is all embedded within a form. 11:23:41 And the method is still get. And it's. 11:23:48 Going for search for port PHP. 11:23:54 So If I click on any of these, let me. Pull up the, sorry. There. 11:24:08 This is not the working version. We see each of these things in the table has a checkbox. And if you check the checkbox 11:24:19 It's in that particular. Value for the first checkbox, the value is athlete, the second checkbox, the value is allergy and so on. 11:24:30 As word 1 one or word 1 3 or word 1 5 or word 1 7. I'm allowing room for expansion there. 11:24:37 So you can send multiple things. To there and I will really briefly. 11:24:50 We'll look at it more, but search. 11:24:54 4 was a PHP file. 11:25:02 So. For each of those table entries. I get it. So this allows me, this technique. 11:25:14 Allows me to send a whole table's worth of values. 11:25:20 To a PhD file and then 11:25:24 If the word is there, we use it. I'll look at that a little bit. More later. 11:25:32 So 11:25:39 They're basically the standard form. Like you see in title search or description search is the more common way to get things into the database. 11:25:55 Hey, can be simple or it can be complex. Also, we discussed the registration example and I'm not sure if this is the current version or not. 11:26:07 But. In fact, let me. 11:26:24 This is more likely to be a correct version. This is a whole registration program. 11:26:43 It has the same. Kind of forms. 11:26:51 That is you have this whole form. The method is get. You specify and again if it's actually on the web page. 11:27:04 You don't have to specify. You know all this so long as it's in the same directory. 11:27:11 And ask for new discipline name. And new ID number. And new section code and those 3 things are passed. 11:27:22 To the PHP when you click on the button. Now if you want to look at more examples, I've got lots of these available here. 11:27:34 Most of my HTML files have a corresponding PHP file. In that example and we have options for admitting a student. 11:27:45 Proven canceling, dropping, enrolling. 11:27:52 Lots of different examples and you're welcome. To investigate that. On Lemuria in the Web section there's registration directory. 11:28:09 And if you have trouble accessing it, let me know and I'll be glad to. To help. 11:28:17 I think you should have. Permissions to go to the directory. But please don't mess anything up in case I gave you too many permissions. 11:28:28 I I also have 11:28:33 In the web, another section. 11:28:38 In this version. I put all my PHP files. 11:28:44 In a same directory, well, mostly. And these PHP files. Are called from the appropriate like calendar 3 I'll just show you. 11:29:04 Now the HTML sometimes. This is HTML for generating a calendar. 11:29:14 Which is fairly complex. Let's see, do I even have a 40, that's the PHP file. 11:29:21 Never mind. 11:29:30 Oh, that, 11:29:38 Well. Here's a file to estimate the bill for a bed and breakfast. And if a number of adults and the number of nights. 11:29:48 This does the estimation using JavaScript, I think. 11:29:55 Which means that it can work without being on the page and if anybody wants to 11:30:05 Investigate any of my examples please feel free but So just so you're aware. 11:30:14 If you're dealing with the database, JavaScript doesn't usually work very well. 11:30:23 There are other ways to do it. But I find you seeing HTML to call PHP and using PHP to manipulate the database. 11:30:33 Works better. Now. 11:30:36 That's by the way, let's see what 11:30:40 That's the project, the software engineering classes working on and if you were in software engineering. 11:30:50 Last year. The project would seem familiar to you. It is also using a database. Being manipulated by web. 11:31:03 So there the examples. About. So. 11:31:09 The web design is the class that teaches HTML. Yeah, advanced web design is the class that teaches manipulation of PHP. 11:31:19 It's okay if you don't know that. But if you want to use HTML and PHP with your project. 11:31:27 We do so on the next presentation that I will record. I'll show you a little bit more about the PHP. 11:31:36 Aspect. In the meantime. 11:31:40 Don't forget to keep. Working on your project and if you have not refined what you're doing.