<?php
require "dbconnect.php"; 
if (isset($_POST['submitx']))
{
	$mitroo=$_POST['mitroo'];
	$onoma=$_POST['onoma'];
	$eponimo=$_POST['eponimo'];
	$onomar=$_POST['onomar'];
	$eponimor=$_POST['eponimor'];
	$tmima=$_POST['tmima'];
	$omp=$_POST['omp'];
	$onomapatera=$_POST['onomapatera'];
	$topospatera=$_POST['topospatera'];
	$xorapatera=$_POST['xorapatera'];
	$epapatera=$_POST['epapatera'];
	$kinitopat=$_POST['kinitopat'];
	$onomamiteras=$_POST['onomamiteras'];
	$toposmiteras=$_POST['toposmiteras'];
	$xoramiteras=$_POST['xoramiteras'];
	$epamiteras=$_POST['epamiteras'];
	$kinitomit=$_POST['kinitomit'];
	$epokidemona=$_POST['epokidemona'];
	$onokidemona=$_POST['onokidemona'];
	$address1=$_POST['address1'];
	$poli1=$_POST['poli1'];
	$tk1=$_POST['tk1'];
	$sms=$_POST['sms'];
	$tilanagkis=$_POST['tilanagkis'];
	$stathero=$_POST['stathero'];
	$ektopismenos=$_POST['ektopismenos'];
	$birthplace=$_POST['birthplace'];
	$birthdate=$_POST['birthdate'];
	$birthyear=$_POST['birthyear'];
	$nationality=$_POST['nationality'];
	$ipikootita=$_POST['ipikootita'];
	$thriskevma=$_POST['thriskevma'];
	$politekni=$_POST['politekni'];
	$idnum=$_POST['idnum'];
	$passport=$_POST['passport'];
	$kinitomath=$_POST['kinitomath'];
		
	$in= "INSERT INTO stnew1
	(mitroo,omp,tmima,sex,eponimo,onoma,eponimor,onomar,onomapatera,topospatera,
	xorapatera,epapatera,kinitopat,kinitotou,onomamiteras,toposmiteras,xoramiteras,epamiteras,kinitomit,kinitotis,
	epokidemona,onokidemona,address1,poli1,tk1,tilanagkis,sms,stathero,kinitomath,kinitoped,
	ektopismenos,birthplace,birthdate,birthyear,nationality,ipikootita,thriskevma,politekni,idnum,passport)
	VALUES 
	('$mitroo','$omp','$tmima','$sex','$eponimo','$onoma','$eponimor','$onomar','$onomapatera','$topospatera',
	'$xorapatera','$epapatera','$kinitopat','ΠΑΤ','$onomamiteras','$toposmiteras','$xoramiteras','$epamiteras','$kinitomit','ΜΗΤ',
	'$epokidemona','$onokidemona','$address1','$poli1','$tk1','$tilanagkis','$sms','$stathero','$kinitomath','ΜΑΘ',
	'$ektopismenos','$birthplace','$birthdate','$birthyear','$nationality','$ipikootita','$thriskevma','$politekni','$idnum','$passport')";
	echo "xxxxxxxxxxxx";
	if ($con->query($in) === TRUE) {
    echo "Η ΕΓΓΡΑΦΗ ΕΓΙΝΕ ΜΕ ΕΠΙΤΥΧΙΑ";
	} else {
    echo "ΚΑΤΙ ΠΗΓΕ ΛΑΘΟΣ: " . $in . "<br>" . $con->error;
	}
}