<?php
include "print_report.php";
include "validation.php";
include "top.html";
include "left.html";
include "prvi.css";
$post = $HTTP_POST_VARS;
$username=$post["username"];
$password=$post["password"];
$password1=$post["password1"];
$email=$post["email"];
$age=$post["age"];
$screen=$post["screen"];
$number=$post["number"];
$C1=$post["C1"];
$C2=$post["C2"];
$Industry=$post["Industry"];
$R1=$post["R1"];
$D1=$post["D1"];
if (isset($insert)) {
$a =new validation();
$a->set_operations("Username",$username,0,3,5,">",5);
$a->set_operations("Password",$password,0);
$a->set_operations("Again Password",$password1,0);
$a->set_operations("Password and Again Password",$password,$password1,2);
$a->set_operations("E mail",$email,0,1);
$a->set_operations("age",$age ,0,4,5,">",2);
$a->set_operations("Screen Name",$screen,0,3,5,"<",5);
$a->set_operations("Some Number",$number,5,"=",10);
$a->set_operations("Industry", $Industry ,0);
$a->val_arr[0]=$C1;
$a->val_arr[1]=$C2;
$a->val_arr[2]=$C3;
$a->set_operations("Sex",$a->val_arr,6,1);
$a->set_operations("Yes/No",$R1,0);
$a->set_operations("Country",$D1,0);
//print($a-> print_operations());
if (count($a->errors)==0) {
print("Form data's have successfully passed procedure of validation");
}else{
$a->print_errors();
}
include "form.html";
}else{
include "form.html";
}
include "bottom.html";
?>
|