For starters,
mysql_connect() should not have a $ accompanying it; it is not a variable, it is a predefined function. Remove the $ to properly connect to the database.
Why do you have an XML tag at the top of this document? This is HTML/PHP - a HTML doctype should suffice.
From line 215, update:
if (isset($_POST)) {
$Name = $_POST['Name'];
$Surname = $_POST['Surname'];
$Username = $_POST['Username'];
$Email = $_POST['Email'];
$C_Email = $_POST['C_Email'];
$Password = $_POST['password'];
$C_Password = $_POST['c_password'];
$SecQ = $_POST['SecQ'];
$SecA = $_POST['SecA'];
}
POST variables are coming from your form, and you have to check whether they exist or not, else PHP will give you a NOTICE error. You can disable these notices by placing error_reporting(0); at the top of your document. It's best to keep these visible for development purposes.
You should only be interacting with the database (inserting, checking) under the condition that the form has been submitted. If you do not, PHP will run all of these operations without any input from the user. Its best to use an IF statement, like so:
if (isset($_POST['submit']) {
// blah blah
// check if user exists, check if fields are blank
// insert the user if all of this stuff checks out..
} else {
// just display the form
}
Awesome form tutorial: http://php.about.com/od/learnphp/ss/php_forms.htm