Section 1

Preview this deck

a==b

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 (101)

Section 1

(50 cards)

a==b

Front

a is equal to b

Back

String variable

Front

can hold text that includes letters, digits, and special characters such as punctuation marks. Enclosed in " " or ' '. $Example = "It is raining";

Back

Post

Front

"Better" method of sending data from forms over Internet. this method should always be used when changes are to be made.

Back

Submit button uses ____ and _____ send methods

Front

Get and Post

Back

Double branch "if" Statement

Front

A branching method which executes one of two blocks of code. it is used when one wants to do one thing or another thing.

Back

print " ";

Front

PHP command which writes out the string enclosed within the quotes to the page before the page is sent back to user. Tag can inset HTML. CAN ONLY OUTPUT A SINGLE STRING.

Back

a != b

Front

a is not equal to b

Back

Variable names

Front

$Variable (YES) $_variable (YES) $1Variable (NO) $Variable1 (YES)

Back

string operator

Front

An operator defined for strings. ( . and = )

Back

Get Method

Front

Sends the encoded info in URL of page request. info is separated from page address by question (?) mark. Sensitive info may be viewed.

Back

Get

Front

Slightly less secure method of sending data from forms over Internet. Length restrictions of 255 or 1024 characters.

Back

CGI Scripts

Front

Small programs that define how the webpage is to be structured.

Back

A > B

Front

A is greater than B

Back

Floating point variable

Front

fractional number

Back

PHP is a scripting language used to

Front

control the automatic generation of HTML pages

Back

echo " ";

Front

PHP command which writes out the string enclosed within the quotes to the webpage before the page is sent back to the user. Can insert HTML code into page. Output a list of (MULTIPLE) strings separated by commas.

Back

nullipotent

Front

The concept that doing something 0 or more times makes no difference. Looking up an address in a database will not make changes in the database.

Back

How would the string variable "Doesn't" be coded?

Front

$variable = "doesn\'t";

Back

A < B

Front

A is less than B

Back

Condition

Front

A part of branching statement which determines the branch to be taken. It is usually a Boolean expression.

Back

Boolean variable

Front

can hold only hold 'true' or 'false' values $Example = false;

Back

Integer Variables

Front

Contains who numbers $variable = 45;

Back

Went data is sent:

Front

It is first encoded using a scheme called URL encoding

Back

Idempotent

Front

The concept that doing one something or more time makes no difference. Example: updating address in a database will result in the same data bring stored whether you make the same change once or many times. there also exists a mathematical definition for this term.

Back

String operator example

Front

<? php $a = "sailing"; $b = "is"; $c = "smooth"; $statement = $a.' '.$b.' '.$c;

Back

$_Get[' '];

Front

PHP function (array/command) which returns data from a submitted HTML form. function used when "method=get".

Back

Single Branch "If" Statement

Front

Branching statement which either execute code or doesn't execute code. It is used when either one wants to do something or not do it.

Back

PHP generally runs in conjunction with _____ web server.

Front

APACHE

Back

URL Encoding

Front

Uses "name=value" pairs. These pairs are joined with ampersand (&). Ex: name1=Value1&Name2=Value2

Back

PHP is popular because

Front

It is powerful, easy to learn, and free.

Back

The _____ converts the PHP code to ___ before it is sent to browser.

Front

Web server; HTML

Back

Floating point variables

Front

Contains numbers with fractions $Example = 4.56;

Back

arithmetic operators

Front

(Modules) +, -, *, /, % (Also: +=, -=, (x)=, /=)

Back

Form codes

Front

<?php $MyFirstName = $_POST['FirstName'] echo "Your full name is:<i>".$MyFirstName."</i>": ?> <form action="MyPage.php" method="post"> <input type="text"> <input type="Send My Name" value="Send"> </form>

Back

$_Post[' '];

Front

PHP array which returns data from submitted HTML form. function is used when "method=post" placed in form tag on html form page.

Back

Languages

Front

Perl, ASP, PHP

Back

Post Method

Front

transfers info by way of HTTP headers. Data is encoded and put into headed called QUERY_STRING. Used to send ASCII as well as binary data. The data goes through HTTP headed so security depends on HTTP protocol. HTTPS:// vs. HTTP:// . Can change in data. Data may be hijacked. Passwords may be learned. Servers discovered. Personal info be revealed. Data may be back tracked.

Back

$_REQUEST[' '];

Front

PHP array which returns data from a submitted HTML form using data from the get or post methods or cookies. Could be dangerous.

Back

/ This is a _______ /

Front

Multi-line comment

Back

Switch Statement

Front

Like multi-way branching, but in a simpler form. May be used with simple variables (integers and strings). (Branching statement which executes one of many blocks of code.)

Back

CGI

Front

Common Gateway Interface. Standard which defines the way that the web server may create web pages.

Back

Boolean variable

Front

True or false

Back

Integer Variable

Front

a variable that stores an integer (number) value.

Back

Multi-Branch if Statement

Front

A branch statement which executes one of many blocks of code. there is a condition at start of each block. It is used when one wants to do one of many things..

Back

Variable types: ____ , _____ , ____ , ____

Front

string, integer, floating point, Boolean

Back

PHP code is _____ seen by browser.

Front

never

Back

//This is a ______

Front

single line comment

Back

assignment operator

Front

the symbol =, which is used to store a value in a variable

Back

<?php and ?>

Front

Tags used to begin and end a block of PHP code, setting it apart from the surrounding HTML code.

Back

String variable

Front

Text only

Back

Section 2

(50 cards)

Check box PHP code

Front

<input type="checkbox" name="thing[ ]" value="Ketchup"/> Ketchup

Back

Value

Front

The word which refers to the data stored in an element of an array

Back

Associative array

Front

An array in which the elements are accessed by an associated key. The $_POST[ ] array is an example to such an array

Back

logical NOT operator

Front

a symbol that reverses the meaning of a Boolean expression. (Uses ! symbol) !(a>b)

Back

Checkbox group

Front

A group of checkboxes having the same Name with the ending in [ ] brackets.

Back

While Loop Example

Front

Iterate while the condition is true while (condition) { do this thing } $ar=array("ax","of","be") $i=0; while($ar[$i] !="or") { $i++; };

Back

Safer than PHP_SELF

Front

htmlentities($_SERVER['PHP_SELF'])

Back

$things=array(red,2,blue);

Front

Syntax for creating an array named things

Back

while loop format

Front

while (expression/condition) { (body) statement; }

Back

Counter

Front

The variable used to hold the count of a loop

Back

increment and decrement operators

Front

Third parameter of the for loop used to change the counter. it is executed at the end of the loop.

Back

While loop

Front

A control flow statement that allows code to be executed repeatedly until the condition changes to false. Possible the statements may not be executed.

Back

if statement structure

Front

if (expression) { // Statements to execute when the expression is true (first branch) }

Back

do while loop example

Front

$ar=array("ax","of","be") $i=-1; do{ $i++; } while($ar[$i] !="or");

Back

2-dimensional array

Front

An array that uses two subscript to locate it's elements. Table.

Back

Double branch example

Front

if ($hr>40) { $ot=40-$hr; $rh=40; } else { $ot=0; $rh=$hr }

Back

For each loop syntax

Front

For each(array_expression as value_element) {Body of Loop (statement to be repeated) }

Back

Array syntax

Front

Dim arrayName(intLastIndex) As DataType

Back

1D Arrays example

Front

$word=array("Ball", "Bat", "Club")

Back

Switch statement example

Front

Switch ($var){ case 1: $output= 'do something if $var contains a 1'; break; case 2: $output= 'do something if $var contains a 2'; break; case 3: case 4: $output='Do something if $var contains a 3 or 4'; break; default: $output=' Do something if $var contains something else';

Back

Initialization

Front

The first parameter of the for loop used to set the starting value of the counter. This is always done before the loop body is entered.

Back

For Loop Example

Front

$s=0; For ($i=2;i<5;$i++) { $s=$s+1+$i; };

Back

increment operator

Front

++; increases the value of a variable by 1

Back

Test or condition

Front

The second paramenter of the loop used to determine when the looping stops. it is executed at the beginning of each iteration or loop.

Back

Value element

Front

Name of variable which will hold value of the element of the array or record it.

Back

isset( )

Front

A function which checks to see if variable has he set and not null

Back

For loop

Front

Runs a block of code over and over for a set number of times. Counter controlled loop which may start the counter at any integer value. The counter may be used within the loop body.

Back

Switch statement works with ____ and ____ variables

Front

integers and string

Back

$things[2]

Front

Way to access element to of an array

Back

Condition

Front

A Boolean expression that is tested for a "True" or "False" value. Used to determine when a conditional loop stops.

Back

a <= b

Front

a is less than or equal to b

Back

for each loop

Front

A shorthand way to visit every element of a collection in order. A loop used for stepping through each element of an array of each record in a database. It is useful when you don't know how many elements you will need to loop through.

Back

1-Dimensional Array

Front

An array which only has one subscript. A list.

Back

decrement operator

Front

the operator (--) that decreases the value of a numerical variable by one

Back

Array

Front

A series of memory locations all with the same name which may be accessed through some type of index or key

Back

3-dimensional array

Front

An array which uses three subscript to located it's elements. Rubik's cube.

Back

Body loop

Front

Executed once for each element in an array or each records in the record set

Back

a >= b

Front

a is greater than or equal to b

Back

Subscript

Front

Another word uses for the index or key

Back

submit buttons

Front

<?php if(isset($_POST['Submit'])) { $name=$_POST['name']; echo "User has submitted the form and entered this name: <b>$name</b>"; else { ?> <form method="post" action="<?php echo $_SERVER['PHP_SELF']; ?>"> <input type=text name="name"> <input type="Submit" name="Submit" value="Submit Form"> </form> <?php } ?>

Back

Body

Front

Contains statements which are to be repeated

Back

is_array

Front

A function to check if a variable is an array

Back

Switch statement

Front

switch (variable you're check against) { case label: code; break; default:

Back

do while loop

Front

This loop always iterates at least once.

Back

Switch Statement example 2

Front

Switch ($var){ case "John": $output= 'do something if $var contains "John" '; break; case "Mary": $output= 'do something if $var contains "Mary" '; break; default: $output=' Do something if $var contains something else';

Back

Multi branch if Statement

Front

if ($a<0) { echo "negative"; } else if ($a==0){ echo "equal zero"; } else if ($a<=40){ echo "between 0 and 40"; }

Back

logical OR operator

Front

Short circuits to true if the first operand is true, and skips evaluating the second operand. - ||

Back

For loop syntax

Front

for(initialization; test or condition; increment) { Body of loop (statements to be repeated) }

Back

2D Array example

Front

$row0=array(hi,bye,no) $row1=array(fun,hate,yes) $AdditionTable=array($row0, $row1) access: $AdditionTable[0][1]

Back

logical AND operator

Front

-two ampersands && -used between two boolean expressions to determine whether both are true

Back

Section 3

(1 card)

Check box PHP code example

Front

<?php if(isset($_POST['artist'])) { $A = $_POST['artist']; $ACount=0; echo 'some artists you like are: <br/>; For each ($A as $AVal) { echo "<i>$AVal</i><br/>"; $ACount++; } } else { echo 'Nothing selected'; }

Back