RON_ron Posted November 1, 2010 Share Posted November 1, 2010 How can I store data which is in a email to a MySQL db? Currently I'm receiving all enquirers in to my INBOX. I need a way to upload data which is in the mail direct from my email page to a MySQL db. is this possible? or what's the best way to approach this? Quote Link to comment Share on other sites More sharing options...
Gem Posted November 1, 2010 Share Posted November 1, 2010 How are peoplesending you the data? Are they filling in a form online? Quote Link to comment Share on other sites More sharing options...
RON_ron Posted November 1, 2010 Author Share Posted November 1, 2010 yes - they are supposed to fill a form online. If you are suggesting to send the data direct from the ONLINE FORM to the MySQL, 1. I need a way to check the submitted data before adding them to the MySQL. 2. How safe is it to allow the user to directly update a MySQL db? Quote Link to comment Share on other sites More sharing options...
BlueSkyIS Posted November 1, 2010 Share Posted November 1, 2010 1. I need a way to check the submitted data before adding them to the MySQL. Google PHP form validation. Essentially check each submitted value to ensure that it is valid. You'd have to do this either way, whether the form data is taken directly from the form or from an email created via the form. 2. How safe is it to allow the user to directly update a MySQL db? As safe as you make it. Validation of the field values is the first step, then use mysql_real_escape_string() as necessary to make values ready for the database. Again, if your plan is to automatically insert whatever is in an email, the user is essentially "directly updating" MySQL anyway. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.