Código PHP:
<?php
//$id = $_POST['id'];
$user = $_POST['username'];
$nom = $_POST['nombre'];
$apel = $_POST['apellidos'];
$email = $_POST['email'];
$pass1 = $_POST['contrasena'];
$pass2 = $_POST['repetircontrasena'];
$sexo = $_POST['sexo'];
$pais = $_POST['pais'];
echo "$nom $apel $user $email $pass1 $pass2 $pais $edad $sexo ";
require('conexion.php');
$sql = "INSERT INTO `usuarios` (`username`, `nombre`, `apellidos`, `email`, `pass1`, `pass2`, `sexo`, `pais`) VALUES ('$user', '$nom', '$apel', '$email', '$pass1', '$pass2', '$sexo', '$pais');";
$result = mysql_query($sql);
mysql_close($con);
header("Location:thanks2.html");
?>