INTEGRATIVE PROGRAMMING - W11 Server Side Scripting
INTEGRATIVE PROGRAMMING - W11 Server Side Scripting
Week 11
Lesson Title Server-Side Scripting
Discuss an interactive web-based application that uses server-side script
Learning Outcome(s) to process data than can retrieve valid rows of data by connecting PHP to
Database (MySQL) using MySQLi Connection method
At SJPIICD, I Matter!
LEARNING INTENT!
Terms to Ponder
Server Language a method of designing websites so that the
process or user request is run on the originating server
Essential Content
Server-side scripting
A method of designing websites so that the process or user request
is run on the originating server. Server-side scripts provide an
interface to the user and limit access to proprietary data and help
keep control of the script source code
x PHP combined with MySQL are cross-platform (you can develop in Windows
and serve on a Unix platform)
PDO will work on 12 different database systems, whereas MySQLi will only
work with MySQL databases.
So, if you have to switch your project to use another database, PDO makes
the process easy. You only have to change the connection string and a few queries.
With MySQLi, you will need to rewrite the entire code - queries included.
After the data type, you can specify other optional attributes for
each column:
x NOT NULL - Each row must contain a value for that column,
null values are not allowed
x DEFAULT value - Set a default value that is added when no
other value is passed
x UNSIGNED - Used for number types, limits the stored data to
positive numbers and zero
x AUTO INCREMENT - MySQL automatically increases the value
of the field by 1 each time a new record is added
x PRIMARY KEY - Used to uniquely identify the rows in a table.
The column with PRIMARY KEY setting is often an ID number,
and is often used with AUTO_INCREMENT
Physically Detached Yet Academically Attached
SELF-SUPPORT: You can click the URL Search Indicator below to help you further understand the lessons.
Search Indicator
x https://www.computerhope.com/jargon/s/server-side-
scripting.htm#:~:text=Server%2Dside%20scripting%20is%20a,
of%20the%20script%20source%20code.
x https://www.w3schools.com/php/php_mysql_update.asp