Inline Code Example Herehello everyone, i am working on a project , in this as all other project we have a login required so i designed a login panel but when i run the project the textboxes of username and password are having its value as "admin",i tried a lot but cant find a solution, another thought came in my mind that it might be because of session as i had used it in my previous project even in that another(previous) project too the moment i open the login page it shows the username and password textboxes with a value as "admin",so if anyone of you know it how the solve or has faced any problem like this and solved it then do share it with me.

Dani AI

Generated

Most likely causes: saved browser credentials/password‑manager autofill, a demo/test value baked into the plugin/template, or JavaScript/server code that sets the inputs on load. As suggested, browsers often fill login fields; pointed to the autocomplete attribute; 's request to see the login script is the right next step, and 's advice to try another browser is a quick diagnostic. OP later confirmed Firefox autofill was involved.

Quick diagnostic checklist:

  • Inspect the input elements with DevTools. If the HTML shows value="admin" the form/template or server code is placing it there.
  • If no value attribute appears but the field shows text, search the page JS for assignments to .value, .val( or code that populates demo credentials.
  • Grep the codebase for the literal string "admin" to find any hard-coded defaults in templates or the slider login package.
  • Test in a private/incognito window, in another browser, and with password‑manager extensions disabled to isolate browser autofill behavior.
  • Check server-side templates that repopulate fields from session/POST data; a development default in session data can silently repopulate inputs.

Recommended fixes and notes:

  • Use explicit HTML autofill tokens such as autocomplete="username" and autocomplete="current-password" on the real inputs so password managers behave predictably. Example:

    <form autocomplete="on">
      <input name="username" autocomplete="username">
      <input name="password" type="password" autocomplete="current-password">
    </form>

    See the MDN reference for autocomplete (values and guidance): autocomplete attribute.

  • If using a third‑party slider/login widget, examine its demo files or source for demo credentials and remove them. Clearing saved logins in the browser or disabling the extension will confirm an autofill source. Note that forcing autocomplete off is not reliably respected by modern browsers; prefer correct tokens and removing hard-coded defaults.

Recommended Answers

All 6 Replies

What's your login script look like?

Member Avatar for Member #671080

A lot of browsers have an autofill feature that helps users with things like login forms. If you are testing this on a local server the browser may be autofilling old details from a previous project.
Have you tried it in a different browser?

Member Avatar for Member #120589

You could try this:

autocomplete="off"

in your input fields. I'm unsure as to the browser compatibility though.

try to check in other browsers....

jay :- its a readymade login i.e slider login (one like twitter) which i have used

diafol :- Great Great i was in a mood of have a fight with the elephant but it was actually not an ant also it (firefox) was doing it may be as you said autofill and i was thinking of session n all once again thank you

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.