I am new to php and tried to develop a login script but when i enter values it is not working. I cant even find the errors because when i click on submit it just refreshes the p
ok, you have an echo statement with a file name:
echo "myaccount.php";
First of all, are you sure that is what you want to do? I believe that will echo the string "myaccount.php". I believe you would want to include "myaccount.php"
secondly, you have referenced the form field "user_name" in your javascript, but the field name you are trying to access is named "email". That might be part of the issue as well.
You are using form method="post", yet looking for $_GET.
Either use method="get" or $_POST!
As you have gathered from the comments there are several other issues with your code with regards to security. Don't be disheartened - everyone was a beginner once. However, you really should read up on SQL Injection and stop assigning all the $_GET values to strings - name each of them in full, ie:
$user_name = trim($_GET['user_name']);
Good luck, and stick with it!
[edit]Ah, as Stephen rightly points out in the comments, the JS uses get to submit the post, so it's actually the field name of 'email' that's the problem.