so, a code that works has these html forms (showBack.php):
<form action="add.php" method="POST">
Name: <input type="text" name="addName"><br>
Price: <input type="text" name="addPrice"><br>
<input type="submit" value="Add">
and then the input is inserted into a database in another file(add.php):
$nam=$_POST['addName'];
$prcc=$_POST['addPrice'];
$sql= 'INSERT INTO korzina (Name, Price, Num)
VALUES ("'.$nam.'","'.$prcc.'", "0")';
mysqli_query($conn, $sql);
now, what i've done is just add more fields and change the table where that info is added (edit.php):
<form action="addd.php" method="POST">
Аты: <br><input type="text" name="addName"><br>
Сипаты: <br><input type="text" name="addDes"><br>
Бағасы: <br><input type="text" name="addPrc"><br>
Өндіруші бағасы: <br><input type="text" name="addRrp"><br>
Саны: <br><input type="text" name="addQ"><br>
Суреті: <br><input type="text" name="addImg"><br>
<input type="hidden" name="addDat" value="<?=$date ?>">
<input type="submit" value="Қосу">
which just means more values to add in another file(addd.php):
$nam=$_POST['addName'];
$des=$_POST['addDes'];
$prc=$_POST['addPrc'];
$rrp=$_POST['addRrp'];
$quant=$_POST['addQ'];
$img=$_POST['addImg'];
$dat=$_POST['addDat'];
$sql= 'INSERT INTO products (name, desc, price, rrp, quantity, img, date_added)
VALUES ("'.$nam.'","'.$des.'", "'.$prc.'", "'.$rrp.'", "'.$quant.'", "'.$img.'", "'.$dat.'")';
mysqli_query($conn, $sql);
but now it just doesn't work. it's the exact same code, just expanded a little, but it doesn't work and it's driving me mad.
edit: there aren't any errors, the code just doesn't work. the shorter code works, ie adds the input into the table no problem, but now that i've added more variables, it doesn't. also, it's just for a stupid assignment, i don't care about sql injection or whatever and i'm sure my teacher doesn't even know what it is