Does anybody have a form built with php that saves data to msql which is secure and does all the checks.? There must be a few around I can use as a base?

thanks