Hi,

I am trying to put together the insert code for a form however what ever I try the = sign here password = MD5 creates an error.

I have tried around 10 variations such as placing the line in brackets but whatever I try it creates an error. When I remove this code it enters the firstname and surname but I cant get the password part to enter. Any suggestions please?


Code:
            $query = mysql_query("INSERT INTO users SET email
            (firstname, surname) VALUES ('".$firstname."', '".$surname."')");
            "' . mysql_real_escape_string($registerEmail) . '";
            password = MD5("' . mysql_real_escape_string($registerPassword) . '");  
            date_registered = "' . date('Y-m-d H:i:s') . '"';  
              
            if(mysql_query($query)){  
                $success['register'] = 'Thank you for registering. You can now log in on the left.';  
            }else{  
                $errors['register'] = 'There was a problem registering you. Please check your details and try again.';  
                
                     }  
        }  
              
            }