Jump to content

Is 'Password' a reserved term?


TomTees

Recommended Posts

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

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

 

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

@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

 

 

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

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

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.