4381 P1

Pataasin ang iyong marka sa homework at exams ngayon gamit ang Quizwiz!

How many radio buttons from the following code can be selected at any given time? <input type="radio" name="address" value="Home" />Home Address <input type="radio" name="delivery" value="FedEx" />Federal Express <input type="radio" name="delivery" value="UPS" />UPS

2

Assume that the POST method is used. Which of the following statements gets the value of the radio button that's on in the delivery group and stores it in a variable named $card_type? <input type="radio" name="delivery" value="USPS" />USPS <input type="radio" name="delivery" value="FedEx" />Federal Express <input type="radio" name="delivery" value="UPS" />UPS

$card_type = $_POST['delivery'];

Assume that the second radio button in the code below has been selected by the user. When you get the value of that radio button, what will the value be? <input type="radio" name="delivery" value="USPS" />USPS <input type="radio" name="delivery" value="FedEx" />Federal Express <input type="radio" name="delivery" value="UPS" />UPS

FedEx

What does $message contain after the following code executes? $rate = 0.1; if ( ! is_numeric($rate) ) { $message = 'Rate is not a number.'; } else if ($rate < 0) { $message = 'Rate cannot be less than zero.'; } else if ($rate > 0.2) { $message = 'Rate cannot be greater than 20%.'; } else { $message = 'Rate is valid.'; }

Rate is valid

Assume that the statements that follow get the data from a text area named comments. After these statements are executed, how will the $comments variable be displayed by an echo statement? $comments = $_POST['comments']; $comments = htmlspecialchars($comments);

With (HTML) character entities for special characters

Which type of loop will always execute its code at least once?

do-while

A hidden field

doesn't appear on the form but its data is sent to the server

What does $message contain after the following code executes? $age = 19; $score = 750; if ( $age >= 21 && $score >= 700 ) { $message = 'Loan approved'; } else if ( $age >= 21 && $score >= 650 ) { $message = 'Cosigner needed.'; } else if ( $age >= 18 && $score >= 680 ) { $message = 'Two cosigners needed.'; } else { $message = 'Loan denied.'; }

two cosigners needed

The value of the htmlspecialchars and nl2br functions is that they let you display

user entries just as they were entered

What does $message contain after the following code executes? $statusCode = "403"; switch ( $statusCode ) { case "200": $message = "OK"; break; case "403": $message = "Forbidden"; break; case "404": $message = "Not Found"; break; default: $message = "Unknown Status"; break; }

Forbidden

Which of the following statements will restart the execution of a loop?

continue


Kaugnay na mga set ng pag-aaral

Contemporary American Indian Voices Assignment

View Set

REVIEW HUMAN NUTRITION AND WELLNESS

View Set

PrepU: Chap. 37: Management of Patients with Musculoskeletal Trauma

View Set

Junior Year Business Classes-Principles of Finance

View Set

Franchising ch. 2 "The Advantages of Franchising"

View Set

U.S History: The Great Depression

View Set

economics rational self interest

View Set