Q:

PHP SQL Form validations

I'm trying to create a form that validates before it is submitted. my php code is:
<?php
    //include the connection file

    require_once('connection.php');
    require_once("validation.php");

    if( isset($_POST['send']) && (!validateName($_POST['name']) || !validateEmail($_POST['email']) || !validatePasswords($_POST['pass1'], $_POST['pass2']) || !validateContact($_POST['contact']) || !validateAge($_POST['age']) || !validateGender($_POST['gender']) || !validateLocation($_POST['location']) || !validateSkill($_POST['skill']) || !validateWork($_POST['work'])) ):?>
                    <ul>
                        <?php if(!validateName($_POST['name'])):?>
                            <li><strong>Invalid Name:</strong> We want names with more than 3 letters.</li>
                        <?php endif?>
                        <?php if(!validateEmail($_POST['email'])):?>
                            <li><strong>Invalid E-mail:</strong> Type a valid e-mail please.</li>
                        <?php endif?>
                        <?php if(!validatePasswords($_POST['pass1'], $_POST['pass2'])):?>
                            <li><strong>Passwords are invalid:</strong> Passwords doesnt match or are invalid!</li>
                        <?php endif?>
                        <?php if(!validateContact($_POST['contact'])):?>
                            <li><strong>Please enter your contact number.</strong></li>
                        <?php endif?>
                        <?php if(!validateAge($_POST['age'])):?>
                            <li><strong>Please enter your contact number.</strong></li>
                        <?php endif?>
                        <?php if(!validateGender($_POST['gender'])):?>
                            <li><strong>Please enter your contact number.</strong></li>
                        <?php endif?>
                        <?php if(!validateLocation($_POST['location'])):?>
                            <li><strong>Please enter your contact number.</strong></li>
                        <?php endif?>
                        <?php if(!validateSkill($_POST['skill'])):?>
                            <li><strong>Please enter your contact number.</strong></li>
                        <?php endif?>
                        <?php if(!validateWork($_POST['work'])):?>
                            <li><strong>Please enter your contact number.</strong></li>
                        <?php endif?>
                    </ul>
                </div>
            <?php elseif(isset($_POST['send'])):?>
                <div id="error" class="valid">
                    <ul>
                    <?php $query = "INSERT INTO employer (name, password, email, contact, age, gender, location, skill, work) VALUES ";                           
                    $query .= "('$name', 'md5($password)', '$email','$contact','$age','$gender','$location','$skill','$work')";
                    // run the query
                    mysql_query($query);?>
                        <li><strong>Congratulations!</strong> All fields are OK ;)</li>
                    </ul>
                </div>
        <?php endif?>

but is shows an error:
Fatal error: Call to undefined function validateName() in /home/sifeiitd/public_html/login1.php on line 7

A:

The error is self-explanatory. You are trying to call a function that does not exist in current context. Are you sure that you have this function in one of your includes?

