Quote:
Originally Posted by Publisher Bucks
Also, as a secondary question on the same subject, once the file is uploaded to the directory on the server, how would I go about submitting that url to a row in my SQL database and attaching it as an image to a specific recipe?
|
Another really simple approach would be to rename your uploaded file to the same name of the title of the recipe. Then you can skip adding the image to a database entirely.
$recipe_title = "Salty Seamen Sauce";
$recipe_image = trim(str_replace(" ", "-", strtolower($recipe_title))) . "jpg";
// which would become salty-seamen-sauce.jpg