Jump to content

Updating MySQL (email)


RON_ron

Recommended Posts

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?

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.