|please help me to write ...
A) Write the code for the login.html document (Client side) which gives the following interface. When the user clicks on the button you must check if the user enters data or not, if the fields are empty you must present an alert message and do not send the data to the server side. If the user entered login and password, then your program must call the validate.php document.
B) Write the code of the server side validate.php page such that.
1) The validate.php checks if the login is valid or not. A valid login must
start with a letter and followed by any one or more of the characters:_, 0-9, A-Z, a-z
For instance, a1, ab_1, and Z_2d are valid logins while _a1, b*, and
c23_@2 are invalid logins. But, there are no restrictions on the password; the user
can use any character in the keyboard. (hint. You must use the regular expression
2) The validate.php page reads the login and passwords from a database
named"students" to verify whether the student is a valid user. The "students"
database contains two tables named "login_pssword" and “marks”. The
login_pssword table has three fields “Student_Id”,"login" and"password”.
Check if the user name and passwords exist. If it exists print the message
"Thank you for logging in". If the password or login is not in the database,
display the alert message "wrongpassword and/or login please try again".
The “marks” table has five fields: student_Id, course_name, first_mark,
3)if a valid user logged in, give him/her two choices:
1. Add a new student
2. Remove a student
Design two different forms, one for each choice above to enable the student to perform the choice he/she selected.
the header code :-
Winow.event.returnvalue = false;
If ((f1.login.value == "") || (f1.password.value ==""))
alert("you must enter your name and password");
window.event.returnvalue = true;
</script> </head> <body>
<form id ="f1" action = "validate.php" method = "post" onsubmit ="validate()">
User Name <input type ="text" name = "login"/> <br />
Password <input type ="password" name ="password"/> <br />
<input type = "submit" value ="login"/>
</form> </body> </html>
General News Suggestion Question Bug Answer Joke Rant Admin
Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.