Skip to main content

Timeline for Basic user registration code

Current License: CC BY-SA 3.0

6 events
when toggle format what by license comment
Jun 21, 2012 at 3:10 comment added Corbin To be blunt, I'm not sure I believe that claim that there are any even remotely recent browsers that display this behavior. Hitting enter should result in the submit button being sent along. Though, for the simple fact that I can't seem to find any reference that that is required behavior, I suppose it may be better to avoid it. And if you meant that one section of PHP code handling multiple forms is bad, I would agree with that. "multiple forms on the same page IS bad", I however do not agree with. (And on that note, I promise I'll stop being an annoying pedant now :p)
Jun 21, 2012 at 2:45 comment added mseancole No these aren't the same logically. But, as you stated, they do practically the same thing. And multiple forms on the same page IS bad. Better to separate that logic.
Jun 21, 2012 at 2:45 comment added mseancole @Corbin: This is something I came upon recently, so I can't provide an example. But I have read enough posts where its claimed that this is a poor choice, even go so far as to claim bad programming, and gave that reason for it. I see that you are stressing "recent", however you can still find people using old browsers. While not common, it is still a possibility, and one that some people like to be aware of and include support for. I phrased that the way I did for this reason.
Jun 21, 2012 at 1:09 comment added Corbin In short, I'd be curious if you can provide an example of a recent browser that exhibits your mentioned behavior. Also, it's worth noting that checking if the request method is post, and checking a button was pressed (or if a hidden input is present) are not the same logical thing (though practically equivalent unless a page is handling multiple forms) (Potentially relevant: w3.org/TR/html401/interact/forms.html#successful-controls) (Also, for what it's worth, +1 :) )
Jun 21, 2012 at 1:07 comment added Corbin (I know I've mentioned this before, and I hate to keep bringing this up, but I'm quite curious about this...) A form submitted in this manor will not register the "submit" because it was not pressed. As far as I'm aware, an input of type submit does not have to be pressed to be considered "successful" (the term used to describe which elements are to be sent as form data). There is a clause that states that only the activated submit button should be considered successful for a form with more than 1, but no such clause about a form with 1.
Jun 20, 2012 at 15:00 history answered mseancole CC BY-SA 3.0