I have created php, form, and mysql database. The password writes to the database fine using the form, but the username does not. I have been stumped on this for hours (and is probably a very simple fix, can someone provide insight? Thanks!\[code\]<?php echo "connected "; //get form data if( !isset( $user ) ) { $user = strtolower( mysql_real_escape_string( $_POST['user'] ) ); } if( !isset( $user ) ) { $pass = md5( mysql_real_escape_string( $_POST['password'] ) ); } //connect to MySQL $connect = mysql_connect( $dbhost, $dbuser, $dbpass ) or die ("connection error"); echo "connected "; //select databse mysql_select_db( $dbdb ) or die ("database selection error"); //insert data $insert = mysql_query("INSERT INTO androidlogin (user, pass) VALUES ('$user','$pass')"); if( $insert ) { $arr2 = array("user" => $user, "pass" => $pass); echo json_encode( $arr2 ); } ?> <html> <head> </head> <body> <title>PHP Register</title> <form action="registerBBD.php" method="POST"> User: <input type="text" name="user" id="user" /><br /> Pass: <input type="text" name="pass" id="pass" /><br /> <input type="submit" name="submit" value="http://stackoverflow.com/questions/14416678/submit" /> </form> </body> </html>\[/code\]