![]() |
|
#1
|
|||
|
|||
Upload pictureI try to upload a picture & store the info about the picture
I faced some problem here, hope that u all can help me..... the error message is "Can't open file!" any codes need the be improved? thanx... If i use this code, i just can upload the file to the folder, not the info to the database.... PHP Code:
upload.php PHP Code:
test.php PHP Code:
common.inc PHP Code:
database table create table files( name varchar(50), type varchar(30), size varchar(30)); create table filedata( file_id int auto_increment primary key, data varchar(30)); |
|||
|
#2
|
||||
|
||||
|
Where do you set the value for $tmp?
__________________
J de Silva Learning Journal | GIDForums™ | GIDNetwork™ | GIDWebhosts™ | GIDSearch™ |
|
#3
|
|||
|
|||
|
oops!!
i just start to learn php, this code is from php.net, not good in modify code.. can u correct it for me thanx... ![]() |
|
#4
|
|||
|
|||
|
i want to check the file whether is a picture format..
but i faced some problem... thanx... Warning: Wrong parameter count for move_uploaded_file() in c:\phpweb\uploading.php on line 14 PHP Code:
Last edited by JdS : 19-Aug-2004 at 06:00.
Reason: Please insert your example PHP codes between [php] and [/php] tags
|
|
#5
|
||||
|
||||
|
If you check the PHP command for 'move_uploaded_file' on the www.php.net website, you'll notice that the command only allows for two parameters.
In your program you have: PHP Code:
take out the $image_types variable and see how your code works out: PHP Code:
In fact, the code looks like it will insert into the database the image type. |
|
#6
|
|||
|
|||
|
it's work if i change the code like this
PHP Code:
|
Recent GIDBlog
Problems with the Navy (Enlisted) by crystalattice
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| phpmyadmin--what format for text files to upload? | bufhal | MySQL / PHP Forum | 0 | 04-Jul-2004 10:07 |
| Hey, i need a good upload feature for my site | alex | Web Design Forum | 2 | 11-Feb-2004 10:59 |
| upload thumbnail | zuzupus | MySQL / PHP Forum | 5 | 27-Aug-2003 07:12 |
| picture site | bob31984 | Web Design Forum | 2 | 15-Aug-2003 08:32 |
| VALIDATING file types on an PHP upload script? | JdS | MySQL / PHP Forum | 0 | 02-Jan-2003 07:58 |
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The