Question

Explain the purpose of the following PHP code $subject_set = find_all_subjects(); $subject_count = mysqli_num_rows($subject_set); List three...

  1. Explain the purpose of the following PHP code

$subject_set = find_all_subjects();
$subject_count = mysqli_num_rows($subject_set);

  1. List three scenarios where sessions are most useful in PHP


Homework Answers

Answer #1

$subject_set = find_all_subjects();

Here, "find_all_subjects" returns the subject list which gets stored in "subject_set".

$subject_count = mysqli_num_rows($subject_set);

Further "mysqli_num_rows" returns the number of rows in the passed argument data set i.e. "subject_set" here, which gets stored in "subject_count"

Session can be used to:

- To store the website visit history of a particular user

- To store purchase cart items when shopping online

- To store the login password for a website, for a particular user login.

Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
PHP Question: _____________________________________________ Write the PHP code to list out all of the dates of the...
PHP Question: _____________________________________________ Write the PHP code to list out all of the dates of the current month and assign them to their given days. As an example, for the month of October 2020, the output should look something like this: October 2020       Monday: 5, 12, 19, 26 Tuesday: 6, 13, 20, 27 Wednesday: 7, 14, 21, 28 Thursday: 1, 8, 15, 22, 29 Friday: 2, 9, 16, 23, 30 Saturday: 3, 10, 17, 24, 31 Sunday: 4,...
Capital budgeting projects can be classified according to the purpose of the project. List and explain...
Capital budgeting projects can be classified according to the purpose of the project. List and explain the three categories for classifying projects according to their purpose.
Explain where JavaScript is executed vs. where PHP is executed.
Explain where JavaScript is executed vs. where PHP is executed.
List and explain THREE non-financial information that may be useful to you in deciding about investing...
List and explain THREE non-financial information that may be useful to you in deciding about investing in shares of a company?
James Fearon identifies three “rationalist explanations for war.” List and explain all three of these. Which...
James Fearon identifies three “rationalist explanations for war.” List and explain all three of these. Which one is the most compelling explanation for war? Sub: Political Science
List and explain all possible scenarios where production of an altered tubulin protein harms a human
List and explain all possible scenarios where production of an altered tubulin protein harms a human
In the receiver VHDL code, what is the purpose of the statement:             elsif (Din =...
In the receiver VHDL code, what is the purpose of the statement:             elsif (Din = ‘1’) then timer <= 0     ? i.e. where does the ‘1’ in Din come from when a message is arriving?
PYTHON The following code implements this algorithm to sort a list of numbers in ascending order....
PYTHON The following code implements this algorithm to sort a list of numbers in ascending order. But some code is missing as indicated by '?'. def sort_in_place(list_num): for i in range(?): for j in range(?): if ?: temp = list_num[j] list_num[j] = list_num[i] list_num[i] = temp my_list = [23,1,45,20,13,-34] sort_in_place(my_list) print(my_list) Modify the three lines of code in the program below so that the output is [-34, 1, 13, 20, 23, 45]
There are three Kinematic Equations. What is the advantage of having these three equations? List the...
There are three Kinematic Equations. What is the advantage of having these three equations? List the scenarios in which we would use one over the other.
What are the three key financial statement? Explain their purpose and type of information provided by...
What are the three key financial statement? Explain their purpose and type of information provided by each.