How do I connect a form to a MySQL database

Asked by:
Aggiez / 5 Points
Time:
2012-01-24 6:13 am EST
Category:
Databases
Hits:
2,378
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.

To ask this user for more information, please first login.

To submit an answer, please login.

Best answer chosen by Web Hosting Hub staff

0

ChristiNi
Staff
13,688 Points
2012-01-24 6:02 pm EST
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.

To submit a comment on this answer, please first login.

ANSWERS

0

ChristiNi
Staff
13,688 Points
2012-01-24 5:24 pm EST
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.

To submit a comment on this answer, please first login.

Want to share this Question?

Related Articles

It looks like there are no related articles.
Would you like to ask a question about this page? If so, click the button below!
Need More Help?

Help Center Search

Current Customers

Email: support@WebHostingHub.com Ticket: Submit a Support Ticket
Call: 757-416-6627 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.
}