user3444350
user3444350

Reputation:

Saving data from forms

Already have a functioning website built with HTML, CSS, JavaScript and PHP for sending information from a contact form. Now have another basic form that visitors can submit information for us to contact them regarding a product launch in the near future.

Form is currently built using HTML and input fields (see below)

<input id="phone2” type="text" name="phone" placeholder="Phone Number" />

We need to collect this data and store it in a database. Is the best way to do this using Rails? Any advice is appreciated.

Upvotes: 0

Views: 53

Answers (1)

Matthew Thomas
Matthew Thomas

Reputation: 36

If your existing site is flat files meaning PHP and HTML are mixed into both and no MVC framework is used then I would recommend just applying you custom php code when the form is submitted, so on $_POST capture the data and submit to the DB, job done.

Upvotes: 1

Related Questions