How do I connect a form to a MySQL database

Asked by:
Aggiez
Time:
2012-01-24 2:13 am
Category:
Databases
Hits:
726
I created a simple mysql db, can anyone provide me with the syntax for mapping a form directly to the table.

Our goal is to have users submit contact information (name, email) for email marketing and promotions. I am somewhat familiar with php.

You must login before you can ask a follow up question.

You must login before you can submit an answer.

Best answer chosen by Web Hosting Hub staff

0

ChristiNi
2012-01-24 2:02 pm
Hello Aggiez,

Unless you want to tackle coding this yourself, I would recommend using PHPlist. PHPlist was created to manage email marketing/newsletter campaigns. Using PHPlist you can create a user subscription form, set up attributes to control what information you ask for, and even send your messages to your users.

If you are looking for a challenge, and do want to code this yourself, you will want to use the PHP INSERT INTO statement. This is how you insert data into a database in PHP. More information can be found here:

http://www.w3schools.com/php/php_mysql_insert.asp

Please let us know if you have any additional questions or need further assistance.

Regards,

Christi N.

You must login before you can post a comment about this answer.

OTHER ANSWERS

0

ChristiNi
2012-01-24 1:24 pm
Hi Aggiez,

Thank you for your question about connecting forms to a MySQL database. The answer will really depend on what you're wanting to do. Is this a contact form where you want to have visitors submit information and have that information stored in a database? Is this a database to store user login information? There are many different types of forms that can be used. Also, are you familiar with PHP? This is the programming language that is most commonly used to connect web pages to MySQL databases.

Please feel free to either update your question or leave a comment below to provide additional details.

Regards,

Christi N.

You must login before you can post a comment about this answer.

Like this Question?

Have a Question?

If you need some help, submit your question to our Community! We guarantee a response within 60 minutes (8am - 9pm EST, Monday - Friday)

Recent Questions

  1. Email from unknown party re domain transfer
  2. how to make new website with single account.
  3. Internal Server Error

Support Center Search

Current Customers

Email: support@WebHostingHub.com Ticket: Submit a Support Ticket
Call: 877-595-4HUB (4482)
757-416-6627 (Intl.)
Chat: Click To Chat Now

Ask the Community

Get help with your questions from our community of like-minded hosting users and Web Hosting Hub Staff.

Not a Customer?

Get web hosting from a company that is here to help.