Okay i have looked through most of the web for the past 2 days, and i can't find anything that brings me closer to a solution. So now i'm asking you guys.
I am creating a ''Library'' system with login, reservations and what not.
I am stuck on the part where i have to attach data on an item to a unique user ID. The idea i had was to take data from table 1, add in 2 input fields and the $_Session[''] and store it together as one row in a seperate table. This is the code i've got so far:
(Sensitive information is changed to something with bunny.)
<?
$MA = $_SESSION['MA_NR'];
$Bunny_Nr = $_POST['Skriv_Bunny'];
$Ordre_Nr = $_POST['Skriv_VO'];
$Ordre_Nr_sub = $_POST['Submit_VO'];
if(isset($Ordre_Nr_sub));
{
$Bunny ="SELECT Bunny_No,
Serie_No,
Model,
Kal_Frekvens,
Sidste_Kal,
Næste_Kal
FROM Cluster
WHERE Bunny_No = '$bunny_Nr'";
$Result2= mysqli_query($conn, $Bunny);
$Row2 = mysqli_fetch_assoc($Result2);
$SQLinto ="INSERT INTO Udlaan (Bunny_No,
Serie_No,
Model,
Kal_Frekvens,
Sidste_Kal,
Næste_Kal,
Laaner,
Ordre_No)
VALUES(" . $Row2['0'] .",
".$Row2['1'].",
".$Row2['2'].",
".$Row2['3'].",
".$Row2['4'].",
".$Row2['5'].",
".$MA.",
".$Ordre_Nr.")";}
$Result_into = mysqli_query($conn, $SQLinto);
?>