I'm trying to make a page where users can add songs to my database. I have some problems with it. When I try it out, the ID, Album Titel and Artiest are added to my database properly, but I only get no value for Duur and 0.00 for Prijs, which is not wat I tried to add.
My code is below:
<form method="post">
<input type="int(5)" name="ID"> ID <br>
<input type="text" name="Titel">Titel<br>
<input type="text" name="Artiest">Artiest<br>
<input type="varchar(6)" name"Duur">Duur<br>
<input type="decimal(5,2)" name"Prijs">Prijs<br>
<input type="submit">
</form>
<?php
$inputid = $_POST['ID'];
$users_name = $_POST['Titel'];
$users_email = $_POST['Artiest'];
$users_website = $_POST['Duur'];
$users_comment = $_POST['Prijs'];
$query = "
INSERT INTO `Album`(`ID`, `Album Titel`, `Artiest`, `Duur`, `Prijs`) VALUES ('$inputid', '$users_name',
'$users_email', '$users_website', '$users_comment');";
$result = $conn->query($query);;
echo "<h2>Thank you for your Comment!</h2>";
mysql_close($con);
?>
The database is linked properly, so that is not the problem. I have the exact same input types a I have in my database structure.
Can somebody help me out? Thanks in advance!