Firstly, please use the code formatting tags around your code so they get highlighted. It makes them easier to read.
I'm guessing that you are getting that error when you visit http://localhost/somephpfile.php in your browser. That would be true because you haven't POSTed any data to the page.
I also noticed that you don't check for errors when you query in your PHP.
Why have you commented out the line with [man]mysql_real_escape_string[/man]? You definitely should be doing that.
You also don't check to see if your [man]mysql_connect[/man] command worked. If that fails, your query is never going to work because you failed to connect. You aren't supplying a password so this is quite likely.