phpwannabe25 Posted August 25, 2009 Share Posted August 25, 2009 hey, i am havin difficulty storing uploading my image into mysql. the database has been set up to include a blob.... i have created a from: <form name="vSignup" method="post" enctype="multipart/form-data" action="processhotel.php"> Photo:<input type="file" name="photo"> <input type="submit" name="Submit" value="Submit"> this is sent to the page 'processhotel.php'.... and this is the code i have on this page <? $photo=$_POST['photo']; $addmember = mysql_query("INSERT INTO signuphotel VALUES ('','$photo')"); ?> Essentially, i am attempting to keep the code as easy as possible. but at the moment, the database is storing it only as 0-kb, even though i did attempt to upload a photo. the other details are being submitted fine into the database. any help would be greatly appreciated. Link to comment https://forums.phpfreaks.com/topic/171785-image-saved-as-blob-in-mysql/ Share on other sites More sharing options...
kenrbnsn Posted August 25, 2009 Share Posted August 25, 2009 Read up on how to upload files. Ken Link to comment https://forums.phpfreaks.com/topic/171785-image-saved-as-blob-in-mysql/#findComment-905845 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.