私はデータベースに多くのものを挿入するフォームを開発しました。しかし、どういうわけか、ページがいっぱいになると、データベース管理者のuser_passwordのみが挿入されます。この問題を解決するにはどうすればよいですか?
<?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'])) ):?>
<div id="error">
<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 age</strong></li>
<?php endif?>
</ul>
</div>
<?php elseif(isset($_POST['send'])):?>
<div id="error" class="valid">
<ul>
<?php $query = "INSERT INTO employee (name, password, email, contact, age, gender, location, skill) ";
$query .= "('$name', '$password', '$email','$contact','$age','$gender','$location','$skill')";
// run the query
mysql_query($query);?>
<li><strong>Congratulations!</strong> All fields are OK ;)</li>
</ul>
</div>
<?php endif?>