Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
100 views

PHP MySQL-Review

The document outlines various PHP concepts including syntax like variables, operators, arrays, and control structures. It also covers functions, loops, forms, sessions, file uploads, and MySQL topics such as queries, joins, and database normalization. The goal is to provide an overview of fundamental PHP programming elements and how to interact with databases using MySQL.

Uploaded by

Maliki Channel
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
100 views

PHP MySQL-Review

The document outlines various PHP concepts including syntax like variables, operators, arrays, and control structures. It also covers functions, loops, forms, sessions, file uploads, and MySQL topics such as queries, joins, and database normalization. The goal is to provide an overview of fundamental PHP programming elements and how to interact with databases using MySQL.

Uploaded by

Maliki Channel
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

1. PHP statement starts always with?

2. Echo / Print examples


3. single quotes ( ' ' ) and double quotes ( " " )
Single quoted strings will display things almost completely "as is." Variables and most
escape sequences will not be interpreted.
Double quote strings will display a host of escaped characters (including some
regexes), and variables in the strings will be evaluated.
4. Comment in PHP
Single line comments
Multi Line Comments - /* ….. */
5. Variable definitions
Variables are storage container in memory
Variables are identified with $ sign
6. Concatenating operator
1.The PHP concatenation operator (.) is used to combine two string values to create one string.
2 Concatenation assignment. =
$string = “PHP" . “MySql";
7. Constant
A constant is an identifier (name) for a simple value. The value cannot be
changed during the script.

8. Include & Require examples


Examples are
<?php include ‘filename.php’ ;?>
<?php require ‘filename.php’;?>
9. Array
a. Indexed array
b. Associative array
c. Multidimensional Array
Indexed arrays - Arrays with a numeric index
Associative arrays - Arrays with named keys
Multidimensional arrays - Arrays containing one or more arrays
10. If statement

 If statement - executes some code if one condition is true

11. PHP Functions


A function is a block of statements that can be used repeatedly in a program.
A function will not execute immediately when a page loads.
A function will be executed by a call to the function.

12. Count() function


The count() function returns the number of elements in an array.
13. PHP Loops
a. While loop
while - loops through a block of code as long as the specified condition is true
b. Do while loop
loops through a block of code once, and then repeats the loop as long as the specified
condition is true
c. For loop
for - loops through a block of code a specified number of times
d. Foreach loop
foreach - loops through a block of code for each element in an array
14. GET and POST,
a. $_GET[“test”]
b. $_POST[“test”]
c. $_REQUEST[“test”]
15. Global variable
A variable declared outside a function has a GLOBAL SCOPE and can only be accessed outside a
function.
16. Upload file
a. enctype="multipart/form-data"
b. move_uploaded_file();
c. $_FILES[“filename”];
17. hash password
a. md5();
b. password_hash($newpassword, PASSWORD_BCRYPT);
c. password_verify($newpassword, $passwordfromdatabase);
18. Session
a. session_start();
b. session_destroy();
c. unset();
19. date(“Y-m-d”) and time() function
date(“2019-02-03”) time(“h:i:s”)
20. MySQL Statements (Select, Update, Insert into, Delete)
21. MySQL Joins, inner join, left join, right join
22. MySQLi Connect and Close function?
mysqli_connect(HOST,DB,USER,PWD) and
mysqli_close($db);
23. Normalizing a database and types of forms
Normalizing a database is a process of changing the database ‘s structure according to several
rules, called forms.
There are 3 type of forms:
First normal form : 1NF
Second normal form : 2NF
Third normal form : 3NF
24. Types of table relationships in MySQL
a. 1-1
b. 1-m
c. m-m

You might also like