TomTees Posted October 27, 2010 Share Posted October 27, 2010 Is 'password' a protected/resevred term in either PHP or HTML? Is this code valid... <li> <label for="password"> <em><img src="images/required.png" alt="required" /></em> Password: </label> <input id="password" name="password" class="text" type="password" /> </li> TomTees Link to comment https://forums.phpfreaks.com/topic/217021-is-password-a-reserved-term/ Share on other sites More sharing options...
rwwd Posted October 27, 2010 Share Posted October 27, 2010 I don't think it is, but for conventions sake I would prefix it with something to make it easier to follow. Reserved php words And the use of <em> in an image seems odd to me, as it is used for rendering text, not images... Rw Link to comment https://forums.phpfreaks.com/topic/217021-is-password-a-reserved-term/#findComment-1127166 Share on other sites More sharing options...
kenrbnsn Posted October 27, 2010 Share Posted October 27, 2010 No. Why are you asking? Ken Link to comment https://forums.phpfreaks.com/topic/217021-is-password-a-reserved-term/#findComment-1127169 Share on other sites More sharing options...
TomTees Posted October 27, 2010 Author Share Posted October 27, 2010 I don't think it is, but for conventions sake I would prefix it with something to make it easier to follow. Reserved php words And the use of <em> in an image seems odd to me, as it is used for rendering text, not images... Rw The <em> is a CSS usability trick that I learned. TomTees Link to comment https://forums.phpfreaks.com/topic/217021-is-password-a-reserved-term/#findComment-1127171 Share on other sites More sharing options...
TomTees Posted October 27, 2010 Author Share Posted October 27, 2010 No. Why are you asking? Ken Because it seems to me that the author of a PHP book I read said it was and so he always used "pass1" and "pass2" on his forms. (Or so I recall?!) TomTees Link to comment https://forums.phpfreaks.com/topic/217021-is-password-a-reserved-term/#findComment-1127173 Share on other sites More sharing options...
rwwd Posted October 27, 2010 Share Posted October 27, 2010 No. Why are you asking? Ken Because it seems to me that the author of a PHP book I read said it was and so he always used "pass1" and "pass2" on his forms. (Or so I recall?!) TomTees @tomtees; I'm intrigued about this 'trick', what exactly does it achieve, as I said, em is for manipulating text.. And WRT passwords, would it not be easier to assign a name to a textarea or input that's relevant to the context of the application your writing.. Seems like the easier way to go to me ;p Rw Link to comment https://forums.phpfreaks.com/topic/217021-is-password-a-reserved-term/#findComment-1127182 Share on other sites More sharing options...
TomTees Posted October 27, 2010 Author Share Posted October 27, 2010 @tomtees; I'm intrigued about this 'trick', what exactly does it achieve, as I said, em is for manipulating text.. My code actually needs to be updated since I changed the label alignment, but when the labels were left aligned, I need <em>. See this article about 3/4 the way down... http://articles.sitepoint.com/print/fancy-form-design-css And WRT passwords, would it not be easier to assign a name to a textarea or input that's relevant to the context of the application your writing.. Seems like the easier way to go to me ;p Rw I have no clue what you are saying?! I used a text field to gather the password. Why would you use anything else?! TomTees Link to comment https://forums.phpfreaks.com/topic/217021-is-password-a-reserved-term/#findComment-1127187 Share on other sites More sharing options...
TomTees Posted October 27, 2010 Author Share Posted October 27, 2010 The <em> could be left in for semantic reasons, although they were more useful when styling left aligned labels and hugging asterisk images. Anyways, the article explains everything. TomTees Link to comment https://forums.phpfreaks.com/topic/217021-is-password-a-reserved-term/#findComment-1127191 Share on other sites More sharing options...
rwwd Posted October 27, 2010 Share Posted October 27, 2010 Well instead of <input type="password" name="password" /> you could have something like <input type="password" name="AdminPassword" /> or <input type="password" name="LoginPassword" /> Purely something to distinguish any ambiguity if your coding lots of things, it just makes the context of what your programming easier to work with and semantically speaking, makes things easier to read if your code is split up in OOP structure. Cheers for the link, good read... Rw Link to comment https://forums.phpfreaks.com/topic/217021-is-password-a-reserved-term/#findComment-1127200 Share on other sites More sharing options...
TomTees Posted October 27, 2010 Author Share Posted October 27, 2010 Well instead of <input type="password" name="password" /> you could have something like <input type="password" name="AdminPassword" /> or <input type="password" name="LoginPassword" /> Purely something to distinguish any ambiguity if your coding lots of things, it just makes the context of what your programming easier to work with and semantically speaking, makes things easier to read if your code is split up in OOP structure. Okay, I follow what you are saying now. Cheers for the link, good read... Rw Yeah, if you want to become an expert on CSS Forms, that is one of the better articles/tutorials out there. That and it also takes in to account Accessibility which is always good! Happy reading, TomTees Link to comment https://forums.phpfreaks.com/topic/217021-is-password-a-reserved-term/#findComment-1127206 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.