Programming Tips : Input Without Form & PHP shortcut
Hello guys! I’m Chrisandy, people use to call me Sandy or Chris. I’m currently doing internship at Tansah Web & Innovation in Bandung. It’s almost a year since i’ve started internship in this company.
I’ve been troubled by many problems since i’m working in here and i’ve got through many difficult problem and try to solve the problem by myself, but there were problems that i couldn’t solve them myself. I’ve tried to find the solution on the internet, and it works. In this blog, i just want to tell you about some of the problems and programming tips that i’ve been through for almost a year of internship program, most specifically about Input Without Form & PHP shortcut.
Input Without Form
The second one that i want to share with you guys is to write file into csv file and move it into specific folder in the server. The first method that i used to do that was using move_uploaded_file() to move the file into specific folder. In this method i’ve to input the array file manually into thec CSV file. It will waste your time to create the code to manually input the array file into CSV file. After that problem was done, then i got the same problem as well. I need to move the CSV file and input the array file into CSV file. But this time i tried to find another solution. Then i found fputcsv() php function.
After read the documentation and tried to apply the function in my code. Then i realized the fputcsv() code not waste your time to create the code to manually input the array file into the CSV file, and fortunately you can use fputcsv() to move your file into the specific folder in the server. You can use this php shortcut if you want to create a file and post it in the server. This way is easier than move_uploaded_file(). If you use move_uploaded_file() method, you should get the file name and the other atribute.
That’s all about what i can tell you guys right now. Working with the team to solve the problem is fun. Arguing with each other is fun. Learn about this problem is new to me and my team at the internship program. If we find another problem and we got the best way to solve it, we’ll share it to you guys. I hope this programming tips will help you in the future. See you in the other blog of mine.
If you are interested, please feel free to check what is internship personnel doing in our blog post.