Unit 7 Lesson-PHP/MySQL

Unit 7 Lesson-PHP/MySQL

memorize.aimemorize.ai (lvl 286)
Section 1

Preview this deck

;

Front

Star 0%
Star 0%
Star 0%
Star 0%
Star 0%

0.0

0 reviews

5
0
4
0
3
0
2
0
1
0

Active users

0

All-time users

0

Favorites

0

Last updated

6 years ago

Date created

Mar 1, 2020

Cards (46)

Section 1

(46 cards)

;

Front

Indicates that the end of a statement has been reached. Must be placed at the end of each statement.

Back

MySQL

Front

database server is also open source and can be used with most server side scripting languages making it one of the most popular among web designers. The database server stores and manages all the databases that you will be creating and using as you learn PHP. It is one of the most popular database servers used with PHP. It is simple to download and install, it is one of the fastest database servers available, and it is free

Back

output buffer

Front

A temporary storage space where content is kept before being sent to its designated output device

Back

variables

Front

Variable identifiers , or the name of the variable, in PHP have a dollar sign ($) prefix, followed by the variable name. I.E $myName = "Mike";

Back

include($file)

Front

function will just import the specified file to a PHP page. function does not check to see if the file has already been imported, so it is possible to import code from the same file more than once with this function.

Back

$_POST['name']

Front

this superglobal variable generally receives its values from a web form that has been submitted

Back

double

Front

numeric variable containing a decimal point. I.E. $myDouble = 3.485;

Back

str_replace($find, $replace, $string)

Front

Searches a string for specific value in a string and replaces it with a new value. The new version of the string is returned.

Back

return

Front

returns a value to the point where the function was called

Back

name and value

Front

two parameters mandatory in the setcookie() function

Back

ob_get_contents()

Front

will return all the content in the output buffer

Back

string

Front

variables stores textual data such as individual characters which can include letters, symbols, and numbers that have been "strung" together. I.E $myName = "Mike"; $myNum = "3485";

Back

mysqli_query()

Front

function can perform the database operations to add records to the database, update existing records, retrieve records, and delete records from the database.

Back

PHP Module

Front

is installed on the computer running the Apache Web Server and will handle all the processing and translating of your PHP code. It will also interact with, collect, or send information to the database servers when necessary.

Back

session

Front

temporary file created by a PHP function that is stored on the server.

Back

preprocessed

Front

code that is processed on the web server before being sent to the visitors web borwser

Back

string

Front

an array of characters

Back

ob_end_clean()

Front

will turn off output buffering

Back

$_GET['name']

Front

this variable can be initialized by a value passed through the URL of a link

Back

gmdate()

Front

returns date and time information, but it needs to know how you want the output formatted

Back

settype($varable_name, "data_type")

Front

Allows you to set the data type of the variable passed to it.

Back

Superglobal Variables

Front

variables that can receive their values from other pages, the browser, or the server

Back

header("location:url");

Front

function will allow you to send data information over the HTTP protocol and perform various operations. We will only use this function to redirect the visitor to another web page. To redirect you should place the URL you want to redirect to in the parameter as a string value. The location: command should be used to indicate you want to redirect the visitor to a new location, followed by the URL of the page.

Back

field names

Front

the first row of a database table

Back

str_replace()

Front

function is basically a find and replace function for strings. the 3 parameters are as follows. (find, replace, originalString)

Back

records

Front

the actual information stored in the database table

Back

integer

Front

numberic variable with whole numbers. I.E. $myInteger = 3485;

Back

require($file)

Front

function also imports external files just as the include() function does, except that if the specified file is not found the script is not processed and an error is displayed instead of the web page.

Back

mysqli_connect()

Front

function that will establish a connection with the MYSQLi Database application

Back

isset($varable_name)

Front

Returns true if the variable passed to it has a value, otherwise does not return anything indicating false.

Back

Apache

Front

is the most popular and one of the most powerful web server applications available and accounts for up to 70% of the web servers running on the Internet. It does not process PHP or interact with database servers; it simply sends the requested web page back to the user's browser as it resides on the server.

Back

mt_rand($min, $max)

Front

function will receive two values which a random integer value ranging from a low end value stored in $min and the high end value stored in $max.

Back

\

Front

Allows for the output of characters that otherwise would have been parsed (interpreted) by the PHP Module such as quotes.

Back

mysqli_error()

Front

function will return the last MySQLi error, which will help in determining why the mysqli_query() function was not able to execute properly.

Back

ob_start()

Front

will turn on output buffering

Back

PHPMyAdmin

Front

open source web application use to manage most databases and tables

Back

include_once($file)

Front

function first checks to see if a file has already been imported, and if it has, it does not attach it again. This is useful if you have used an include in multiple files that you have to use together. This way, PHP will not include the files that have already been included, which saves on file size of the page.

Back

setcookie()

Front

create a new or update an existing cookie

Back

mysqli_fetch_array()

Front

function will return the data in one row of the table selected table

Back

echo

Front

Outputs text, HTML code, and other data generated by PHP to the browser.

Back

<?php and ?>

Front

Delimits the PHP code from the HTML code on a document. The set of tags for PHP code.

Back

die()

Front

used to end a script funning

Back

modulus

Front

Divides two integers and only gives the remainder as the result. For example 3%7 would result in 1. This operator does not work with real numbers.

Back

Outputting Superglobal Variables

Front

Superglobal variables can be output using the echo command, however when a superglobal variable is output within a string, the single quotes around the variable name should be removed otherwise you will get an error. The echo command below will result in an error due to the single quotes around the variable name. echo "First Name: $_POST['first']"; The echo command below will execute without error. echo "First Name: $_POST[first]";

Back

id

Front

primary key for most database tables

Back

cookie

Front

is a small file created by a PHP function that is stored on the visitor's computer

Back