This is a discussion on "Upload image file to MySQL as BLOB" within the PHP Forum section. This forum, and the thread "Upload image file to MySQL as BLOB are both part of the Program Your Website category.
|
|
|
|
|
![]() |
||
Upload image file to MySQL as BLOB
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
|||
|
Upload image file to MySQL as BLOB
hello,
i have this code below in which to upload image and store if in the database but it occurs an error upon running the program please help me im stack in here .. thankss
errors: Warning:fopen: failed to open stream: No such file or directory in Warning: feof(): supplied argument is not a valid stream resource in on line 26 |
|
|
|
|||
|
Re: Upload image file to MySQL as BLOB
your error message is basically saying that there is no image, so $_REQUEST["imgfile"] has no image 'in it'
remove your current enctype: enctype="application/x-www-form-urlencoded" if you want to upload any file with a form you must have this attribute: enctype="multipart/form-data" don't worry, I think this gets EVERY php developer when they're starting out... that should do the trick Last edited by jimz; Aug 17th, 2007 at 16:35. Reason: Forgot something |
|
|||
|
Re: Upload image file to MySQL as BLOB
Jim
Doesn't he need to use $_FILES rather than $_REQUEST to get the uploaded file ? Justin |
|
|||
|
Re: Upload image file to MySQL as BLOB
I stand corrected! sorry...
Quote:
I don't use and would not advise using $_REQUEST at all and instead use $_GET or $_POST. I didn't want to confuse csun by giving to much info. |
![]() |
| Tags |
| mysql blob, upload |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| PHP+SQL+File Upload | joshlindem | PHP Forum | 5 | May 10th, 2008 16:48 |
| file upload | berry05 | Job Opportunities | 0 | Mar 19th, 2008 19:09 |
| [SOLVED] Image Upload with PHP/MySQL | kidreapertronV | PHP Forum | 5 | Jan 31st, 2008 17:08 |
| asp file upload script having problems with MYSQL | paulmcn | Classic ASP | 2 | Oct 5th, 2005 18:45 |
| file upload asp-mysql database | fluff | Classic ASP | 7 | Aug 19th, 2004 10:45 |