4 quizzes found.

Consider the following HTML fragement. Which of the following name attributes should be used to capture all of the data from the user in PHP?

<select name="?????" multiple>
<option value="1">Item #1</option>
<!-- ... more options ... -->
</select>
  1. myselectbox=array()
  2. myselectbox[]
  3. myselectbox['multiple']
  4. myselectbox{'multiple'}
  5. myselectbox

Choose 1 answers

When uploading a file using HTTP, which variable can be used to locate the file on PHP's local filesystem?

  1. None of the above
  2. $_FILES['fieldname']['tmp_name']
  3. $_FILES['fieldname']
  4. $_FILES['fieldname'][0]['filename']
  5. $_FILES['fieldname']['filename']

Choose 1 answers

How can the index.php script access the email form element of the following HTML form?

<form action="index.php" method="post">
	<input type="text" name="email"/>
</form>
  1. $_GET['email']
  2. $_POST['email']
  3. $_SESSION['text’]
  4. $_REQUEST['email']
  5. $_POST['text']

Choose 2 answers

What happens when a form submitted to a PHP script contains two elements with the same name?

  1. They are combined in an array and stored in the appropriate superglobal array
  2. The value of the second element is added to the value of the first in the appropriate superglobal array
  3. The value of the second element overwrites the value of the first in the appropriate superglobal array
  4. The second element is automatically renamed
  5. PHP outputs a warning

Choose 1 answers