troubleshooting Question

upload image to blob field

Avatar of error77
error77 asked on
10 Comments1 Solution426 ViewsLast Modified:
Hi all,

I am tring to upload an image to a blob field and just created a field on type blob, thinking that was it...but I get all types of different things over the now I have this:

<form id="form" method="post" enctype="multipart/form-data">
<input type="file" name="thumbnail" />

...then to save:

$thumbnail = $_REQUEST['thumbnail'];

//Not sure about this:
$fileName = $_FILES['thumbnail']['name'];
 $tmpName = $_FILES['thumbnail']['tmp_name'];
 $fileSize = $_FILES['thumbnail']['size'];
 $fileType = $_FILES['thumbnail']['type'];

and finally:

$sql = "insert into users(firstname,lastname,phone,email,thumbnail) values('$firstname','$lastname','$phone','$email','$thumbnail')";

I'm I doing this wrong? I'm confused with this.

Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 10 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 10 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros