Long-term plan unit: 10.4А Web-development |
School: |
||||
Date: |
Teacher name: |
||||
Grade: |
Number present: |
absent: |
|||
The topic of the lesson:
|
Linking a Webpage to a Database |
||||
Learning objectives(s) that this lesson is contributing to |
10.3.3.3 link a webpage to a database |
||||
Assessment criteria |
• be able to create forms with examples • be able to create a database and table for the registration page in XAMPP • be able to create a registration page • be able to associate a registration page with a database and write data to a database using SQL commands. |
||||
Success criteria |
All learners will be able to know: • know what form is and how it is used. Most learners will be able to know: • be able to create a database and table for the registration page in XAMPP Some learners will be able to know: Know and could link webpage to database without any help • be able to create a registration page • be able to associate a registration page with a database and write data to a database using SQL commands. |
||||
Language objectives
|
Useful phrases for dialogue / writing • Website, webpage, HTML, CSS, tag, javascript, script, PHP
• The script is used for ,,,, • The form is intended for ..., • Multiple selection drop-down menus ..., • The "Submit" button defines a button for ..., • The action attribute defines ..., • Method Attribute specifies the HTTP method (GET or POST) to be used ... • Always use POST if these forms contain ... |
||||
Value links |
Group work , co-operation, time management |
||||
Cross curricular links |
English |
||||
Previous learning |
Tags, tables, scripts |
||||
Plan |
|||||
Planned lesson stages |
Planned activities |
Resources |
|||
Beginning
0-1
2-3
3-13 |
Question for students: - Can you remember what we discussed in our previous lesson?
Teacher: - I want (would like) to introduce today’s topic about …/ What do you think today’s topic is?
The presentation of the theme and lesson objectives.
Call. Guiding recommended questions to determine the topic and criteria for assessment: • What is a DB? • What programs are needed to create a database? • How is SQL decrypted? • What is a query, what is it for? • How do we use a query on the Internet? |
Presentation
Appendix 1 |
|||
Middle 14-34
|
Practical work. Students continue to develop a form for the registration page, connect the registration page with the database, according to the following tasks 1. Create a database using phpmyadmin mysql. 2. Create a table by calling the php script and processing the MySQL commands. 3. Create a registration page 4. Connect the registration page to the database. 5. Write data to the database using SQL commands. |
appendix 2
|
|||
The end of the lesson 35 - 40 |
At the end of the lesson, learners reflect on their learning: ✓ What has been learned ✓ What remained unclear ✓ What needs more attention
|
|
|||
Differentiation – how do you plan to give more support? How do you plan to challenge the more able learners? |
Assessment – how are you planning to check learners’ learning? |
Health and safety check |
|||
Differentiation can be expressed in the selection of tasks, in the expected result from a particular student, in providing individual support to the student, in selecting the educational material and resources, taking into account the individual abilities of the students (Theory of Multiple Intelligence by Gardner). Differentiation can be used at any stage of the lesson, taking into account the rational use of time. |
Use this section to record the methods that you will use to assess what the students have learned during the lesson.
|
Health and safety check links. Used active exercises. Items applied from the Safety Rules in this lesson. |
|||
Reflection
Were the lesson objectives/learning objectives realistic? Did all learners achieve the LO? If not, why? Did my planned differentiation work well? Did I stick to timings? What changes did I make from my plan and why?
|
Use the space below to reflect on your lesson. Answer the most relevant questions from the box on the left about your lesson. |
||||
|
|||||
Summary evaluation
What two things went really well (consider both teaching and learning)?
1:
2:
What two things would have improved the lesson (consider both teaching and learning)?
1:
2:
What have I learned from this lesson about the class or individuals that will inform my next lesson?
|
|||||
Appendix 1
• What is a DB?
• What programs are needed to create a database?
• How is SQL decrypted?
• What is a query, what is it for?
• How do we use a query on the Internet?
Appendix 2
1. Create a table by calling the php script and processing the MySQL commands.
2. Create a database using the phpmyadmin mysql tool.
PHP script for connecting the database
<? php
// Database Connection - object oriented way !!
$ mysqli = new mysqli ("localhost", "root", "", "xml");
// localhost - server, root - DB user, “” password and xml - database
if ($ mysqli === false) {die ("Error: Could not connet". $ mysqli-> connect_error); }
else {echo "Connected Sucessfuly. Host info:". $ mysqli-> host_info; }
// MySQL command to create a table
$ sql1 = "CREATE TABLE persons (id INT NOT NULL PRIMARY KEY AUTO_INCREMENT, name VARCHAR (30) NOT NULL, password VARCHAR (30) NOT NULL, email VARCHAR (70) NOT NULL UNIQUE)";
// message if the table is created
if ($ mysqli-> query ($ sql1) === true) {echo "Table create successfully"; }
else {echo "Error: Could not be able to execute $ sql". $ mysqli-> error; }
// close script
mysqli_close ($ mysqli);
?>
1. Modify the MySQL command to insert data into the table, as shown below:
2. $ sql = "INSERT INTO persons (name, password, email) VALUES ('Ayan', 'Ulan', 'ulan@mail.com')";
• Run the script again and see if the table will be created in the database.
• Make changes to the php script to add the address and phone number to the new MYDB database.
• Insert values in the database column, addresses and phone numbers into the new MYDB database.
Скачано с www.znanio.ru
Материалы на данной страницы взяты из открытых источников либо размещены пользователем в соответствии с договором-офертой сайта. Вы можете сообщить о нарушении.