I'm currently working on a way to submit a image using a form to a table in one of my databases. I got everything else done except for the image part, I looked at some tutorials, but their rather confusing. I was thinking maybe I could get some help here?
HTML:
<form action="" method="post" enctype="multipart/form-data">
<h1>Service Name: </h1>
<select name="serviceNamesForm">
<?php
require_once 'includes/dbh-inc.php';
$sql = "SELECT serviceName FROM addService;";
$result = $conn-> query($sql);
while ($row = $result-> fetch_assoc()) {
$service_name = $row['serviceName'];
echo "<option value='$service_name'>$service_name</option>";
}
?>
<br></br>
<input type="text" name="product" placeholder="Product Name...">
<br></br>
<input type="file" name="productImage">
<br></br>
<input type="submit" value="Submit">
</select>
</form>