a) is there a MySQL database on the server?
b) is the mysql extension enabled in php.ini / compiled into the apache php module?
c) do you have the right database connection details - hint: live database servers where the 'root' account doesn't have a password are not a good idea.
d) does the database 'ramya' exist on the database server?
e) does the 'registration' table exist in the database 'ramya'?
f) are there any records in the registration table?
g) is email id a numeric or string field - the query assumes the emailid field is a string
h) is there a SMTP mail server installed and running on your webserver?
i) is the SMTP server configured to allow the php mail() function to run properly - mail() won't error even if the SMTP server can't send emails.