+ 2

How to make what is in the description

Something like: var user = <input type=“text”</impu> Something like the Thing that is up but whit password If((user == Help)&&(password == please help)) { Send to another page }

16th Mar 2018, 9:14 PM
Octavio Aguayo
Octavio Aguayo - avatar
5 Antworten
+ 3
If I understand correctly, you want to implement login/register system, which is way more complicated than you think. It requires form made in html, some filtering in JavaScript and a lot of work in some server side language and database query. Just don't give up, and take something easier for practice, until you are ready for bigger projects. Good luck.
16th Mar 2018, 9:22 PM
Amar
Amar - avatar
+ 2
You could make it only with Html and Javascript, but it will not be safe until you don't test the password value on server side, because html and js source code are send to user, and it's necessarly quite easy to discover the good password inside them or avoid the password check by getting the address of the targeted page, or at least (if you use some obfuscation) to hack the page and access to the page. Minimal (and relative) safety would be to check on server side if user is connected (through a login page, with server side password verification) before authorizing access to the protected/reserved/private page ^^
16th Mar 2018, 9:43 PM
visph
visph - avatar
+ 1
True, the fact that it is executed on client's computer, it is easly exploitable by so many malwares and hacktools, and that is just not acceptable.
16th Mar 2018, 9:50 PM
Amar
Amar - avatar
+ 1
Please help in that, I know that is complicated but i see some tutorials to implement the security this is only for pracrice. Because I want to make games and mini-pages but only for my family and I. Not for people registing. I want to learn How to put functions on the “Onclick=“”” of a button.
17th Mar 2018, 9:56 PM
Octavio Aguayo
Octavio Aguayo - avatar
+ 1
Well, <input type="button" onclick="myFunc()">Press me</input> Then you deifne your function in JavaScript: function myFunc(){ //code of function }
17th Mar 2018, 10:34 PM
Amar
Amar - avatar