After all these code still i cannot load csv to mysql [closed]

You’ve got a number of problems in your code, which you should fix before you proceed:

  • Possible SQL injection via the uploaded file – you are not escaping your user inputs. Do a search-engine search for “PHP mysql_real_escape_string” and read what the PHP manual has to say here
  • Using a deprecated database library. If you fix this, you can use parameterisation, which fixes the first problem too
  • No check made as to whether your database connection or query has succeeded
  • Unclear and inconsistent indentation
  • Closing paragraph tag (</p>) with no corresponding opening tag

Once you have fixed those issues, I suggest you then use echo and exit to debug this code – the problem could be any number of things.

Browse More Popular Posts

Leave a Comment