Jump to content

Recommended Posts

I created a login system with bootstrap but for some reason I cannot delete the "placeholder" (in which it is written "admin") in both the inputs of the form ("uname" and "psw").

Even if I change the placeholder it's remain "admin". Have you any idea?

This is the code:

<!DOCTYPE html>
<html>
<head>
<title>Login</title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.0/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.0/js/bootstrap.min.js"></script>
<link rel="stylesheet" type="text/css" href="css/styles.css">
</head>
<body>
    <div class="container">
        <div class="jumbotron text-center" id="jumbo_log">
            <h1>Login Page</h1>
            <p>You must login to enter</p>
            <form id="theform" method="get">
                <div class="container2">
                    <label for="uname"><b>Username</b></label>
                    <input type="text" id= "uname" name="uname" required><br>
                    <label for="psw"><b>Password</b></label>
                    <input type="password" id="psw" name="psw" required><br><br>
                    <input type="submit" id="submit" class="btn btn-info" value="Login"><br><br>
                 <a class="btn btn-primary" href="registration.php" role="button">Click here if you are not registered</a>
             </div>
          </form>
      </div>
</body>
</html>

login.png

This looks like your browser is set to remember form fields. You don't have a placeholder attribute set on the username field, and password fields don't support placeholder attributes (I think - I'm pretty sure that's true...) so the presence of text in that field is a sign that the culprit isn't what you think it. Delete the form data via your preferences.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.