I have ten fields in my table in database..And two columns out of them are of
- User_Id (auto_increment I need it
for uploading pics.) - Username (I want it as primary key
so that no other user can get the
same username)
I am not able to do both these things together. If I make user_id auto_increment then I am not able to assign primary key to Username. How I can overcome from this problem ?
2.
How to allow only doc (msword) files for uploading….
i tired ($_FILES[“file”][“type”]==”application/msword”)
But this i snot working…I tried same code for pdf files that is working
working code ($_FILES[“file”][“type”]==”application/pdf”)
3.
First i upload files from an application form into a folder and stores its name and size into database.Then i deleted files from that folder and also deleted entry in database manuly…means now in my employee table there is no entry in database ..
But when i upload a file which has already been uploaded into database in past(to particular folder but i have deleted that file from folder and database) now if i apply file_exist condition it say that file already exists ..Why so..Is there is any tempory folder which is invisible from us..which contain this entry..???????
1: Let user_id be autoincremented and set username to UNIQUE
2: Are you sure this (“application/msword”) is the right and only MIME-Type for word-documents?
3: Are you sure the file is getting deleted? You should double-check that. Sounds like file permission issues to me.