
Technology • Year Year 11 • 70 • 17 students • Created with AI following Aligned with Australian Curriculum (F-10)
PHP statements used to update a MySQL database
Curriculum Area: Australian Curriculum: Technologies
Specific Focus:
Class Context: 17 students
By the end of this lesson, students will:
Attendance and Housekeeping (2 minutes)
Lesson Overview (3 minutes)
Engage Students with a Quick Quiz (5 minutes)
Brief Recap of PHP Basics (5 minutes)
<?php
// Your code here
?>
Introduction to MySQL Database (5 minutes)
PHP to Update MySQL (10 minutes)
<?php
// Database credentials
$servername = "localhost";
$username = "root";
$password = "";
$dbname = "school";
// Create connection
$conn = new mysqli($servername, $username, $password, $dbname);
// Check connection
if ($conn->connect_error) {
die("Connection failed: " . $conn->connect_error);
}
// SQL update statement
$sql = "UPDATE students SET favourite_subject='Digital Technologies' WHERE id=1";
if ($conn->query($sql) === TRUE) {
echo "Record updated successfully";
} else {
echo "Error updating record: " . $conn->error;
}
$conn->close();
?>
favourite_subject and grade.Review and Recap (5 minutes)
Q&A Session (5 minutes)
Homework Assignment
This lesson plan is crafted specifically to align with the Australian Curriculum and cater to the needs of Year 11 students, ensuring they gain practical skills in PHP and MySQL database management. Teachers can adapt this framework based on individual classroom dynamics and student proficiency levels.
Join thousands of teachers using Kuraplan AI to create personalized lesson plans that align with Aligned with Australian Curriculum (F-10) in minutes, not hours.
Created with Kuraplan AI
🌟 Trusted by 1000+ Schools
Join educators across Australia