Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialKnowledgeWoods Consulting
5,607 PointsGet details from an incoming email and store them in database
I want to store few fields like name, email, phone etc. which i receive in an email in my MySql database. What will be the correct way to do that?
1 Answer
Ted Sumner
Courses Plus Student 17,967 PointsI don't think that is a PHP issue as PHP is a server based web language. You need to program something in Python or Ruby or Java or another language capable of running on your computer. You then have to have it read the email and send stuff to the database. I don't think that is an easy task. If you want to manually enter stuff into a database using PHP, you could build a simple form to copy and past what you want into a database running through a local server like XAMPP. You could actually build out a nice little web app with PHP to do all sorts of stuff with the information.
Otherwise, you might have better luck with JavaScript. I know they use that for desktop applications like Brackets, but it is outside my wheelhouse to build stuff like that.
KnowledgeWoods Consulting
5,607 PointsKnowledgeWoods Consulting
5,607 PointsI googled and found something called imap_open() Will it be of any help?
Actually i am building a ticketing system in which when i receive email it automatically gets stored in DB.
Ted Sumner
Courses Plus Student 17,967 PointsTed Sumner
Courses Plus Student 17,967 PointsThat may help, but be sure to read up on security issues.