What does the mysqli_connect command do?
Connecting to a Database using PHP

Quiz
•
Computers
•
Professional Development
•
Hard
JX Chow
Used 12+ times
FREE Resource
9 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
It connects to the web server
It connects to the email server
It connects to the database server
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Choose the correct way to use the mysqli_connect() command.
$servername - Address of the Target Database Server
$databasename - Name of the Target Database
$username - User Name
$password - User's Password
mysqli_connect($username, $password, $servername, $databasename)
mysqli_connect($databasename, $servername, $username, $password, )
mysqli_connect($servername, $databasename, $username, $password)
mysqli_connect($servername, $username, $password, $databasename)
3.
MULTIPLE SELECT QUESTION
45 sec • 1 pt
In the code above what is the $dbconnection used for?
It is used to check if the connection was false
It is used to store the connection to the database
It is used to check if the connection was successful
It is used to store the database
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
I have written the following SQL command, what is the command I need to execute to run the SQL?
$sql = "SELECT name, phone, email FROM tblmembers"
mysqli_fetch_assoc($sql)
mysqli_query($dbconnection, $sql);
mysqli_fetch_assoc($dbconnection, $sql)
mysqli_query($sql);
5.
MULTIPLE SELECT QUESTION
45 sec • 1 pt
What do you get when you execute the mysqli_query command?
Selected Records from the Web Server
Selected Records from the Database
If the page was successfully loaded
If the query was successfully executed
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
The above Code has been executed and results in the table have been retrieved
How can I get the Phone number in the results?
$row[2]
$row["Phone"]
$result["Phone"]
$result[2]
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Results in the Table above have been retrieved using sqli_query and saved in the $result variable
What will the code output to the HTML page?
Alice John James
$row["regname"] $row["regname"] $row["regname"]
Alice
John
James
$row["regname"]
$row["regname"]
$row["regname"]
8.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Given $results in the table above
$x = mysqli_num_rows($result)
What is the value of x?
3
1
2
4
9.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which is the correct order for these commands to appear in a typical PHP page
1 - mysqli_query
2 - mysqli_num_rows
3 - mysqli_connect
4 - mysqli_fetch_assoc
3, 2, 1, 4
1, 2, 3, 4
3, 1, 2, 4
3, 2, 4, 1
Similar Resources on Quizizz
10 questions
DDL - Create

Quiz
•
Professional Development
10 questions
SQL Commands - UPDATE Statements

Quiz
•
Professional Development
14 questions
AZ-900 Module 1

Quiz
•
1st Grade - Professio...
10 questions
Objetos SQL Server

Quiz
•
Professional Development
10 questions
Understanding PHP and Its Ecosystem

Quiz
•
Professional Development
10 questions
PLSQL and Cursor Quiz

Quiz
•
Professional Development
10 questions
Azure Data Fundamentals Module 2

Quiz
•
Professional Development
10 questions
Module 5 & Module 6

Quiz
•
University - Professi...
Popular Resources on Quizizz
15 questions
Character Analysis

Quiz
•
4th Grade
17 questions
Chapter 12 - Doing the Right Thing

Quiz
•
9th - 12th Grade
10 questions
American Flag

Quiz
•
1st - 2nd Grade
20 questions
Reading Comprehension

Quiz
•
5th Grade
30 questions
Linear Inequalities

Quiz
•
9th - 12th Grade
20 questions
Types of Credit

Quiz
•
9th - 12th Grade
18 questions
Full S.T.E.A.M. Ahead Summer Academy Pre-Test 24-25

Quiz
•
5th Grade
14 questions
Misplaced and Dangling Modifiers

Quiz
•
6th - 8th Grade