I`m making a site where users have to sign up. They will be contacted later once the site is ready.
Right now, I have a simple plugin that creates a form and sends me the contact info via email of anyone who signs up.
Is this a stupid plan? Should I have a form that submits the information to a database? or can the contact info be easily exported from gmail later when needed?
If you think a database is a better solution, can you recommend a simple PHP script with the necessary filters.
I`m building the initial site with WordPress. Want to be prepared in the event that a lot of people sign up.
I would almost assuredly save this information in a database.
You'll be able to actually use this info as part of your site when it goes live. Gonna be hard to do that with user info scattered across thousands of emails.
Email is notoriously unreliable. The plugin may 'send' the email. But it might not wind up in your inbox. It might take years to get there. You might accidentally delete it. Who knows.
If you just have to have an email notification when people sign up then do both. Save it to the database and then shoot off the email.
As for the script to access the database. That's a tad bit out of the scope of my intended answer. :)
However, I would take a look at the PHP MySQL manual. Or you can check out something like Doctrine.
Ofcourse it would be much easier to export the data later from a DB, or use it straight from the DB without exporting it. However, yours is not a stupid plan, since you will have the email addresses. They will just be a little harder to extract from mail - depending on how many you will have to extract, you might need to create a script that reads your gmail address, extracts all the emails that match a pattern, parse their text and extract the emails - not quite rocket science, bu definitely harder than doing a simple select on a table
This would probably be a good candidate for a database task, or even a flatfile log record at the very least. Emails are not reliable enough to handle the task of keeping track of your data. Sure, you get the info by email, but what then? You probably have or will have other steps to take with that data, the fact that it is in an email will not make it easy to automate those tasks.
If you lose your emails, you lose your data. Ok .. backing up emails is no harder that backing up a database, but the database is built to keep track of data, whereas emails are not.
As far as I know, you'd be better off putting their info in a database while you build. Then, when your ready you can modify that database for whatever you need. If you have them sent to your Gmail, you may end up doing a bit of copying and pasting.
The other benefit of using a db is that you can write a script to run through each entry and e-mail that person telling them your ready and where to sign up.
storing information about the user in database is better option. Because you told once the site is ready you have to contact the users, so by saving their details you can do contacting them very easily by querying the data from the database.
Email is okay if you are in for a temporary site. Database is far better for long term use. Storing it in a database makes it more accessible and organized and you can even have a program to send emails from the entries in the database, if you need mails too.
Database is definitely the answer since pulling the e-mail ids out from your mail is going to be one long task.
You mentioned you are using wordpress. There are tons of plugins available for this specific task (such as this one). Do make sure to use a plugin that satisfies all your requirements.