Jump to content

image saved as blob in mysql???


phpwannabe25

Recommended Posts

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.