index.php FILE
<?php
include 'input/send.php';
?>
<html>
<head>
<title></title>
<meta charset="UTF-8">
</head>
<body>
<form method="post" action="input/send.php">
<input name="login" type="text">
<input name="password" type="text">
<input name="email" type="text">
<input name="email_password" type="text">
<input name="revocation_code" type="text">
<input name="mafile_text" type="text">
<input name="push" type="submit">
</form>
</body>
</html>
SENd.php FILE
<?php
$con = mysqli_connect("localhost","root","");
$db = mysqli_select_db($con, "team");
if(isset($_POST['push'])){
try_to_connect();
}
function try_to_connect(){
if($con == true){
$log = $_POST['login'];
$pas = $_POST['password'];
$email = $_POST['email'];
$email_pas = $_POST['email_password'];
$rev_code = $_POST['revocation_code'];
$mafile = $_POST['mafile_text'];
$result = mysqli_query("INSERT INTO `tablica`(`login`,`password`,`email`,`email_password`,`revocation_code`,`mafile_text`) VALUES ('$log','$pas','$email','$email_pas','$rev_code','$mafile')");
echo "allright";
}else{
echo "not working";
}
}
?>
В общем написал простенькую форму отправки, пытаюсь отправить в базу данных данные, не срабатывает, в чем я ошибся?