Sorry this is one of the worst copy and edits I've ever seen.
Lets break down your errors
Fist Error: You are using a form POST with a form GET
Code:
<form method="post" action="[color=red]register.php?id=register[/color]">
There's no need to use both. It will only cause problems. Since you're using post you can just use
Code:
<form method="post" action="[color=blue]register.php[/color]">
Second error: The php codes you have are taken from multiple releases and just combined. This is a bad habit as you don't learn anything. You have way too many typical if/else statements, use google and look up if/elseif. It will save you alot of lines of code in the long run.
Third error: Your email script isn't even an email check. All it does is take a user inputted message and puts it into the database. So it will take anything from a user. examples would be, I enter
none, nothing, blank it will accept all of those as being valid.
There are many other issues with this code, but that's all ill give info on.
Suggestion: Anyone who uses this, beware of the flaws.
To the original poster:
Lesson of the day, if you're going to release codes at least make sure you understand what you're doing.