how to make a pop up error in php.... i have try do do in using javascript but in don't know how to send data from form php to javascript after click the button. actually this pop up i'm using for my login function. if the nameid null the error will pop up. this is my code... function msg() { var name; name = 'nameid';(how to retrieve data from php form-nameid is from php form) if (name == "") { alert("error messages"); } else { alert(name);// i need to display a name value alert("yes"); } } this is my login form <form name="form1" method="POST" action="" > <p><strong>Members Login</strong> </p> <p><span class="storyLeft style8">User ID</span> <input type="text" name="nameid" style="margin-left:24px"/> <br/> <br/> <span class="storyLeft style8">Password</span> <input type="text" name="password" style="margin-left:6px"/> </p> <input name="Submit" type="submit" value="Login" style="margin-left:80px " onclick="msg()" /> || <a href="#" class="capsule">Register</a> </form> in need to send nameid to javascript .... how do i do that... please help me or give me a new suggestion to make a pop up error... thanks.....