1- We create a form where we will perform the validation.

![](https://scriptcase-support.kayako.com/base/media/url/6NlsMj9JkPnthbV5eFkiy5Mt08C9D7NT)

2- In the OnValidate event of our form we introduce the code with this scheme

if (condition == condition)

{

insert the data to the other table;

} else {

echo "no records added";

}

![](https://scriptcase-support.kayako.com/base/media/url/vNnvex1BN4aKQhlQCaEF2wgh93fnnClc)

3- this will proceed to add the record in our other table of our database

![](https://scriptcase-support.kayako.com/base/media/url/47R2cxzGhQrgAmYZgfCJeWHFgkJMQaKA)