Dear Sirs,

Can you please check this code and comment what should be the proper one.

<label for="username">Username:</label> <br />
<input id="username" type="text" value="ENTER USERNAME" onclick="this.value='';" name="username"/>
</p> <p>
<label for="password">Password:</label> <br />
<input id="password" type="password" value="ENTER YOUR PASSWORD" onclick="this.value='';" name="password" />

here is the link for this one...
http://insanitygzonecom.ipage.com/clubfive/login.php

Member Avatar for LastMitch

an you please check this code and comment what should be the proper one.

I'm not familiar with javascript being part of a form that is in PHP.

I guess there is something wrong with your onclick="this.value='';"?

Cannot Log-in Properly(always denied) HTML

It also means that your form is wrong that you can't get access to the database to confirm whether the user has access.

So what is it you want to be triggered when there is an onclick event?

Have you tried putting this in a form and linking that to an action script? I'm not very familiar with javascript but what should onclick="this.value='';" do? can you show that part of the code?

When the form loads the input boxes have 'ENTER USERNAME' and 'ENTER YOUR PASSWORD' in them as values. The onclick event is just clearing those values so when the user clicks on the input box it empties the box so the user can type their username and password. The issue probably lies within the PHP code that processes the input. Can you post your PHP code?

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.