Ok im making a user managment system. Now this is only a test one to see if i can make it work before i make one for my real website. Though i keep getting an error on line 18 in my register2.php file. Here is the code. [code] <?php $username = $_POST['username']; $password = $_POST['password']; $email = $_POST['email']; $picture = $_POST["picture"]; $ip = $REMOTE_ADDR; $username = strip_tags($username); $email = strip_tags($email); $picture = strip_tags($picture); $password = md5($password); if ( !$username || !$password || !$email || !$picture) { die( "All fields are required!" ); } $connect = mysql_connect( "x", "x", "x" ); if ( ! $connect ) { die( "Could not connect to SQL server" ); } $insertstatement = "INSERT INTO Users VALUES ('$username', '$password', '$email')"; mysql_select_db( "cydrive_test", $connect ) or die ("Could not open database:" .mysql_error() ); $selectresult = mysql_query( "SELECT * FROM Users WHERE username=’$username’", $connect ); $numrows = mysql_num_rows( $result ); if ( $numrows > 0 ) { print "The username you have chosen is in use. Please choose another one."; } else { mysql_query($insertstatment, $connect )or die( "Couldn't add data to table" ); print "Registration successful! Login <a href="login.php"> here</a>"; } ?> [/code] Heres the code for register.php is it helps any. [code] <HTML> <TITLE>Index Page</title> <BODY bgcolor="#ffffff"> <html> <body bgcolor = "black"> <? session_start(); if($_SESSION["username"] = null) { ?> <form action="register2.php" method="post"> Username: <input type="text" name="username" size="15"><br> Password: <input type="password" name="password" size="32"><br> Email: <input type="text" name="email" size="50";><br> Picture: <input type="text" name="pictures" size="1000";><br> <center><input type="submit"><input type="reset"></center> </form> <? }else{ print"You are already logged in"; ?> </body> </html> </BODY> </HTML> [/code] Heres a link to register.php [url=http://h1.ripway.com/cydrive/]http://h1.ripway.com/cydrive/[/url] [b]edit(shoz): removed login details[/b]