ICT245 Web Programming PHP Lectures Part II
ICT245 Web Programming PHP Lectures Part II
ICT245
Web Programming
Introduction to PHP
Silence Hour
Visit
https://www.w3schools.com/php
/php_mysql_connect.asp
Read for 25 minutes.
1
07-Aug-24
Today’s Lecture
2.0
1.0
Performing
Connecting
CRUD
to MySQL
operations on
Database
MySQL
using PHP
Database using
PHP
3.0
4.0
Designing Combining
HTML PHP and HTML
forms for in a single
file uploads document
Web Technologies Lecture Slides by : Maxwell Dorgbefu Jnr.
2
07-Aug-24
3
07-Aug-24
4
07-Aug-24
5
07-Aug-24
6
07-Aug-24
7
07-Aug-24
if ($_FILES["file"]["error"] > 0)
{
echo "Error: " . $_FILES["file"]["error"] . "<br />";
}
else
{
echo "Upload: " . $_FILES["file"]["name"] . "<br />";
echo "Type: " . $_FILES["file"]["type"] . "<br />";
echo "Size: " . ($_FILES["file"]["size"] / 1024) . " Kb <br />";
echo "Stored in: " . $_FILES["file"]["tmp_name"];
}
?>
8
07-Aug-24
9
07-Aug-24
Exercise
• By using PHP and Bootstrap, produce the 2 and
5 times table from 1 to 50 for your younger
siblings at the basic levels of education.
2 X 50 = 100 5 X 50 = 250
Web Technologies Lecture Slides by : Maxwell Dorgbefu Jnr.
10