1

for example, if I have a form

<form action="" method="post"> <div name="superman" value="clark kent"></div> <object name="batman" value="john smith"></object> </form> 

Will I get the $_POST values?

update: w3c says object above sends data. I'm currently unsure about div.

1
  • I don't think that will work, but I can't test it right now. I think the only way to do it is use form input, textarea and select fields, but I'd definitely get a second opinion. Commented Dec 19, 2011 at 14:37

3 Answers 3

2

No. Only controls are transmitted in forms.

Background in W3C: Forms in HTML documents, especially the chapter on successful controls.

Sign up to request clarification or add additional context in comments.

1 Comment

object sends form data according to the successful control specification. w3.org/TR/html4/interact/forms.html#h-17.13.2
0

The form data only contains data from input, select and textarea elements. Your form data will be empty.

Comments

0

No it won't. The form only goes through certain pre selected elements, like input, select and textarea elements & post their value.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.