Как мне это сделать, вставляя изображение в строку!
I want to insert on a multiple image on sql like on the picture below! I can only do singe image And how do I display it one by one
https://i.stack.imgur.com/RO8WX.png[^]
Вставлено в строку image1 image2 image3 image4
<?php $msg = ""; $msg_class = ""; $conn = mysqli_connect("localhost", "", "", ""); if (isset($_POST['submit'])) { $profileImageName = time() . '-' . $_FILES["profileImage"]["name"]; $target_dir = "images/"; $target_file = $target_dir . basename($profileImageName); if($_FILES['profileImage']['size'] > 200000) { $msg = "Image size should not be greated than 200Kb"; $msg_class = "alert-danger"; } if(file_exists($target_file)) { $msg = "File already exists"; $msg_class = "alert-danger"; } if (empty($error)) { if(move_uploaded_file($_FILES["profileImage"]["tmp_name"], $target_file)) { $sql = "INSERT INTO users SET profile_image='$profileImageName', bio='$bio'"; if(mysqli_query($conn, $sql)){ $msg = "Image uploaded and saved in the Database"; $msg_class = "alert-success"; } else { $msg = "There was an error in the database"; $msg_class = "alert-danger"; } } else { $error = "There was an erro uploading the file"; $msg = "alert-danger"; } } } ?>
Что я уже пробовал:
Я пробовал все, что угодно, но ни один из них не работал вообще! его не вставляют в sql