Click here to Skip to main content
       

JavaScript

 
GeneralRe: HTML5 Javascript Issue PinmvpJohn Simmons / outlaw programmer4-Dec-12 1:06 
GeneralRe: HTML5 Javascript Issue PinmvpJohn Simmons / outlaw programmer4-Dec-12 7:31 
GeneralRe: HTML5 Javascript Issue PinmemberZaf Khan19-Dec-12 20:36 
AnswerRe: HTML5 Javascript Issue PinmemberZaf Khan19-Dec-12 20:42 
QuestionCatching Exceptions in Javascript PinmemberVed Yo29-Nov-12 14:43 
QuestionPartial Overlay to cover ajax request PinmemberSentenryu29-Nov-12 1:51 
QuestionHow to get value from TD PinmemberChitttapa26-Nov-12 10:03 
Questionhelp me please Pinmemberdoa'a_9224-Nov-12 4:16 
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
in php).
 

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,
second_mark, Final_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 :-
 
<html> <head> <script type = "text/javascript">
Function validate(){
     Winow.event.returnvalue = false;
     If ((f1.login.value == "") || (f1.password.value ==""))
                     alert("you must enter your name and password");
     else
             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>

AnswerRe: help me please [modified] PinmemberLeon Munir25-Nov-12 13:46 
GeneralRe: help me please PinmemberJ4amieC25-Nov-12 21:13 
GeneralRe: help me please PinmemberLeon Munir26-Nov-12 2:06 
GeneralRe: help me please PinmemberJ4amieC26-Nov-12 5:30 
GeneralRe: help me please PinmemberMarcus Kramer26-Nov-12 5:37 
GeneralRe: help me please Pinmemberdoa'a_9226-Nov-12 9:28 
Questiononmouseover and document.getElementById PinmemberSRJ9223-Nov-12 4:18 
AnswerRe: onmouseover and document.getElementById PinmemberJ4amieC23-Nov-12 4:48 
GeneralRe: onmouseover and document.getElementById PinmemberSRJ9223-Nov-12 5:49 
AnswerRe: onmouseover and document.getElementById Pinmemberjainsachin30-Nov-12 9:17 
Questiondisplaying different contentunder single layout Pinmemberradha123 from Hyderabad23-Nov-12 3:32 
AnswerRe: displaying different contentunder single layout Pinmembermanojwadnere28-Dec-12 0:07 
QuestionRegular expression PinmemberMember 962181822-Nov-12 2:25 
AnswerRe: Regular expression [modified] Pinmembern.podbielski22-Nov-12 20:00 
GeneralRe: Regular expression PinmvpManfred R. Bihy22-Nov-12 21:20 
GeneralRe: Regular expression Pinmembern.podbielski23-Nov-12 21:15 
Questionform validation Pinmembertherainking7821-Nov-12 22:07 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.


Advertise | Privacy | Mobile
Web01 | 2.8.140721.1 | Last Updated 29 Jul 2014
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid