added some stuff

This commit is contained in:
szabomarton 2024-12-04 09:23:17 +01:00
parent 900adee579
commit 350f937b4f

View File

@ -1,5 +1,9 @@
<?php <?php
require_once('config.php'); require_once('config.php');
session_start();
if (!isset($_SESSION["datainserted"])){
if( if(
isset($_POST["vnev"]) && isset($_POST["vnev"]) &&
isset($_POST["knev"]) && isset($_POST["knev"]) &&
@ -16,26 +20,32 @@
$aktiv = 0; $aktiv = 0;
} }
$parsql = "INSERT INTO tagok (vnev, knev, email, telefon, lakcim, aktiv_tagsagi_statusz) $parsql = "INSERT INTO tagok (vnev, knev, email, telefon, lakcim, aktiv_tagsagi_statusz, tagsag_kezdete)
VALUES (?,?,?,?,?,?)"; VALUES (?,?,?,?,?,?,?)";
$durr = $conn->prepare($parsql); $durr = $conn->prepare($parsql);
$durr->bind_param("ssssss", $durr->bind_param("sssssss",
$_POST["vnev"], $_POST["vnev"],
$_POST["knev"], $_POST["knev"],
$_POST["email"], $_POST["email"],
$_POST["telefon"], $_POST["telefon"],
$_POST["lakcim"], $_POST["lakcim"],
$aktiv $aktiv,
$_POST["aktiv_tagsagi_statusz"]
); );
if ($durr->execute()==true){ if ($durr->execute()==true){
echo '<b>sikeres feltöltés</b>'; echo '<b>sikeres feltöltés</b>';
$_SESSION["datainserted"] == true;
}
} }
} }
if(isset($_SESSION["datainserted"])){
if($_SESSION["datainserted"]){
unset($_SESSION["datainserted"]);
}
}
?> ?>
<script> <script>