Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Back End Basic Form Issues

  • This topic is empty.
Viewing 12 posts - 16 through 27 (of 27 total)
  • Author
    Posts
  • #195576
    JamesBarnsley
    Participant

    submit needs to be onsubmit. I re-corrected my post a couple of seconds after I posted the original.

    <form onsubmit=”pasuser(this)” name=”login”>

    #195577

    Nearly! It works on an incorrect password (invalid password dialog box) but on a correct password it puts the password into the address bar again. Also the button does not work when the password is correct.

    #195578
    JamesBarnsley
    Participant

    Can you paste the whole script into CodePen again?

    #195579
    #195580
    JamesBarnsley
    Participant

    Ok, do you onsubmit like this …

    onsubmit=”return pasuser(this);”

    And put the following …

    return false;

    Just before the closing last } of your pasuser function.

    #195582

    You sir, are a legend. Thankyou for your time.

    #195583
    JamesBarnsley
    Participant

    It is working now I take it?

    Glad I could be of service.

    #195584

    Yes it works perfectly.

    #195585
    JamesBarnsley
    Participant

    Ok good.

    #195733

    Hi,

    Yeah it’s not a big deal. Open to suggestions on how to make it more secure. I originally had a javascript “gatekeeper” script that would go to the page that you type in (eg jasper.html) but for some reason I can’t remember, that didn’t work.

    I eventually want to work out how to set up accounts for people and have them type in a unique password for RSVPing online but I’m a way off that at the moment with my knowledge of all this.

    Thanks.

    #195739

    If someone with the password wants to share the page it links to then they could just as easily give out the password.

    It’s a little bit to stop people from stumbling across it and being given all the details of our wedding. It’s unlikely given the domain name I am looking at using for it but still possible. If someone comes across it looking for something else it’s just another level of security. Yes it’s a weak level but I can’t imagine anyone wanting to get through so bad they would look at the source code. It’s only slightly better than an “enter” button without any sort of password but I’m happy with that.

    It’s also because it’s the only way I know how to do it. If I knew an easier way of password protecting the site I’d use that, the more secure the better but it serves its purpose.

    #195746
    JamesBarnsley
    Participant

    Hi,

    Yes quite a bit of knowledge will be needed to implement a proper log in system.

    Have you thought about password protecting the directory through .htaccess?

    Normally CPanel has the option to password protect directories using .htaccess through a GUI user interface. Provided you have CPanel or similar on your host should be OK.

    Alternatively you could code it into the .htaccess file manually.

    However there is probably no need to do this, by the sounds of it, the JS password protection will be suitable for your purpose anyway.

    James.

Viewing 12 posts - 16 through 27 (of 27 total)
  • The forum ‘Back End’ is closed to new topics and replies.