Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

1. In the following statement, $con : $con=mysqli_connect(\"www.amazoncloud.com\

ID: 3873974 • Letter: 1

Question

1. In the following statement,   $con :

$con=mysqli_connect("www.amazoncloud.com","bravo","rio","astra")

a. is variable that return the connection to the database

b. is the name of the database

c. is a method name

d. is the ecommerce host server

2. In the following statement , astra:

$con=mysqli_connect("www.amazoncloud.com","bravo","rio","astra")

a. is variable that return the connection to the database

b. is the name of the database

c. is the password to the database

d. is the username to the database

3. To execute the query “select * from product” embedded in a web application, with a database connection $mydat, we use

a. $admin = mysqli_query (“select * from product”);

b. $admin = exec_query ($mydat, “select * from product”);

c. $admin = mysqli_query ($mydat , “select * from product”);

d. exec_query ($mydat , “select * from product”);                                                              

Explanation / Answer

$con=mysqli_connect("www.amazoncloud.com","bravo","rio","astra")

Here www.amazoncloud.com-> is the server name

bravo->is username of the connected DataBase.

rio-> is the password of the connected Database.

astra-> is the name of the DataBase.

$con= is a variable return the connection to the DB.

1 Ans:a. $con is a variable return the connection to the DB.

2 Ans:b . Name of the Database

3 Ans:C. $admin=mysqli_query($mydat,"select *from product");

here $mydat -> is the which database you conncted