ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
but this was just a test script/test page to understand how uploading via csv works.The same uploading has to be done in a page addstudent.php
The code for addstudent.php page is
but this code is not adding the values inside csv to database I have tried to upload it many times and modified the code many times.
bucket.php is just a few classes to handle sql
here you can see bucket.php
what is the error or problem in addstudent.php or additionally what can I do to debug it I am not able to understand if $_POST["import"] contains any thing or not just to make sure if it has got the csv file or there are no connection errors in database.
Hi, there I am having a locally hosted xampp and I am trying to upload student database
I have tested code sample from here ...
to understand how uploading in database works so I was able to upload with following code
in file upload.php
...
but this was just a test script/test page to understand how uploading via csv works.The same uploading has to be done in a page addstudent.php
The code for addstudent.php page is
...
but this code is not adding the values inside csv to database I have tried to upload it many times and modified the code many times
....
what is the error or problem in addstudent.php or additionally what can I do to debug it I am not able to understand if $_POST["import"] contains any thing or not just to make sure if it has got the csv file or there are no connection errors in database.
Only you can debug your code, it is not generally acceptable to post whole code and ask others why it is not working.
Quote:
What is the error?
I must turn that question around - what are the error messages you are seeing? We cannot really tell anything from the information you have given.
Please provide any error codes being generated when the script is run. If you are not seeing any errors then I would first verify that the server is not suppressing them. I have no familiarity with xampp but you should locate the php.ini file used by PHP under Apache and set...
Code:
display_errors = on
error_reporting = E_ALL
...and introduce an intentional error to be certain it is sending errors to your screen.
Also check the Apache error logs for the platform.
Based on what you see, try to figure out what is happening then return here if when you have more information!
Also, please review the Site FAQ for guidance in posting your questions and general forum usage. Especially, read the link from that page, How To Ask A Question The Smart Way. The more effort you put into understanding your problem and framing your question, the better others can help.
The programming forum is open to all platforms and languages, but the audience here is decidedly Unix/Linux oriented. If your platform is no Linux or a Unix variant, as suggested by xampp, you might want to post your question to a forum frequented by users of the OS you are using.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.