I am trying to put an image link into a form (not as a submit button). I am having trouble extracting the image when I process the form.
Here is my php code for putting the image in a form...
$picture = "
<div id='photo'>
<input type='image' name='image' src='www.sampleimage.jpg'>
</div>";
<div class='formData'>
<form action='recToDb.php' method='post'>" .
$picture .
"<input type='submit' name='toDB'>
</form>
</div>";
The image is uploaded as HTML and that part works fine. Once the user is satisfied, they can hit the submit button. At that point, I want to add the image (or the source of the image) to a database. For now, I am just trying to extract the image with this code...
if (isset($_POST['toDB']))
{echo $_POST["image"];}
If I do var_dump($_POST), the image is not even in the array so I believe that the image is not going into the form, but I don't know exactly what my problem is.
Note that there are other things in the form that I did not display in the above code that I have no problem extracting.