php - some doubts like..user.id and username(primary key function),how to allow doc file for databaee,file_exist problem -


In my table, there are ten fields in my table..and two of those columns are

  1. User_Id (Auto_Increment is required for me to upload it.)
  2. Username (I want to put it as the primary key so that another user gets the same username)
  3. < / Ol>

    I can not do these two things together. If I auto_increment user_id I can not provide the primary key for the user name. How can I overcome this problem?

    2.

    How to allow only the doctor (msward) files to upload ....

    I exhausted ($ _FILES ["file"] ["type"] == " Application / msword ") but I am working on it ... I tried the same code for PDF files that are working code ($ _FILES [" file "] [" type "] ==" Applications / PDF " 3) First of all, I upload a file from an application in a folder and store its name and size in the database. Then I deleted the files from that folder and deleted the entry in the database ... This means that there is no entry in the database on my employee's desk. .

    But when I upload a file that was already uploaded to the database (in the special folder, but I have removed that file from the folder and database) Now if I apply the file_exist condition So it is to say that the file already exists .. why it is .. There is no temary folder which is invisible from us .. in which this entry is .. ??????? 2: Are you sure that this ("Application / MS Word") is correct and is only mime-type word documents. ?

    3: Are you sure the file is being deleted? You should double check it. I feel like file permissions issues.


Comments

Popular posts from this blog

oracle - The fastest way to check if some records in a database table? -

php - multilevel menu with multilevel array -

jQuery UI: Datepicker month format -