Hello! This is my first post. :)

Is it inappropriate to place many <input type="hidden".... to submit?

Here's an example:

<form action="/" method="post"><input type="hidden" name="ad" value="0x2443ae42"><input type="hidden" name="ad" value="0"><input type="hidden" name="ad" value="3"><input type="hidden" name="ad" value="test"><input type="submit" value="apps"></form>

Some browsers seem to not send back all the data. My guess is, forms aren't the proper way of sending a stack back to the server.

Thank you very much!

Recommended Answers

All 2 Replies

It is fine to have multiple hidden values inside a form. The problem is that you have multiple hidden values with exactly the same name but different values. I am not sure how you retrieve your data on your server side. You could use different name for different hidden value.

Pretty cool idea. Though I haven't tested this idea yet I like it.

Normally when I submit values under the same name my server builds a stack. What you're saying is, this is not a common method of using forms. Some browsers might only send one value with that input name.

I think that's good enough to be solved. I'll figure it out.

Thanks a ton!!!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.