Move Upload Path To Constant In An Include File Flashcards

1
Q

How do you connect to an SQL database?

A

mysqli_connect(‘address’,’username’,’password’,’database’);

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

How do you query the sql database?

A

Mysqli_query(“SELECT * FROM database_name”;

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

How do you call script that is shared?

A

require_once(‘shared_vars.php’);

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

How do you define a constant?

A

define (‘CONSTANT_NAME’, ‘storedinfo’);

Call it by example:

$target = CONSTANT_NAME . $othervar;

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

How do you delete a file from a ab server?

A

Using unlink() function

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

How do you suppress any potential errors from a function?

A

Precede it with an @ symbol. Eg:

@unlink()

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What is better for data retrieval that doesn’t change anything on the server, GET or POST?

A

POST is used to send data to the server through a form.

GET is used for data retrieval that doesn’t change anything on the server

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

How do you clear data from variables?

A

By setting the variable to nothing.
Ex:
$vartobecleared = “”;

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

The type attribute of the tag must be set to this for a file upload form field.

A

File

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

It is usually a good idea to store uploaded app images in a …… Folder.

A

Images

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

This SQL statement is used to change the structure of a table.

A

ALTER

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

To prevent DELETE FROM statement from deleting more than one row, use this SQL statement.

A

LIMIT

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

When a file is uploaded through a form it is place in a ……… Folder on the web server.

A

Temporary

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

This PHP statement is used to create a constant.

A

Define()

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Information about uploaded files are stored in the $_….. Superglobal variable.

A

$_FILES()

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

This SQL statement is used as part of another to order query results in descending order.

A

DESC

17
Q

This SQL statement is used to put the results of a query in a certain order.

A

ORDER BY

18
Q

This php statement is used to insert code from another script.

A

INCLUDE

19
Q

When altering a table, this SQL command takes care of adding a new column.

A

ADD COLUMN

20
Q

It’s a good idea to do this to newly uploaded files.

A

Move

21
Q

Include files are very handy for ……. Data among several script files

A

Sharing