Validating a form

hie

so i do my form hey and everything is working fine, but i then realise that my form is not validating, so i was wondering if someone could help me with the script that will validate my form. below is the script i’ve used on my form.

on the form movie clip i put this script:
[COLOR=red]onClipEvent(data){
_root.nextFrame();
}[/COLOR]
[COLOR=#ff0000][/COLOR]
[COLOR=black]and on the submit button i put this script:[/COLOR]
[COLOR=red]on (release) {
form.loadVariables(“email.php”, “POST”);
}[/COLOR]
[COLOR=#ff0000][/COLOR]
[COLOR=black]oh and also i dont know the script for a rest button i also need help with that.[/COLOR]

thanks guys