nerdexam
Zend

200-550 · Question #198

An HTML form contains this form element: <input type="image" name="myImage" src="image.png" /> The user clicks on the image to submit the form. How can you now access the relative coordinates of the…

The correct answer is D. $_POST['myImage_x'] and $_POST['myImage_y']. See the full explanation below for the reasoning.

Question

An HTML form contains this form element:

<input type="image" name="myImage" src="image.png" /> The user clicks on the image to submit the form. How can you now access the relative coordinates of the mouse click?

Options

  • A$_FILES['myImage']['x'] and $_FILES['myImage']['y']
  • B$_POST['myImage']['x'] and $_POST['myImage']['y']
  • C$_POST['myImage.x'] and $_POST['myImage.y']
  • D$_POST['myImage_x'] and $_POST['myImage_y']

How the community answered

(34 responses)
  • A
    12% (4)
  • B
    9% (3)
  • C
    3% (1)
  • D
    76% (26)

Community Discussion

No community discussion yet for this question.

Full 200-550 Practice