Problem with Questionaire on website that Im hosting

So I has this form with a submit button, just regular stuff. But I have no clue how to directly send those forms from the web server directly to MySQL database.

Anyone got some tips?

6 Replies

crewsta,

We'll need to know a little more about what you're doing before we can venture a guess.

  • What language are you using on the server end?

  • Are you using an open source package such as Wordpress, Drupal, Joomla, etc?

If you have software to read the DB entries that you want to write, does it have support for getting the entries into the DB?

MSJ

You cannot use an HTML form to submit information to a (MySQL) database without processing it through a server-sided scripting language such as PHP first.

Here is a very basic tutorial on using PHP to insert POST data from an HTML form into a MySQL database: http://www.w3schools.com/php/phpmysqlinsert.asp

After you get the basics down you'll want do some research on how to prevent SQL injection attacks through forms like this.

To: Main Street James,

I'm using the Adobe Dreamweaver CS6 to write my website, I got my linode all set up

To Zach,

thanks for the link i will check it out

crewsta,

DW is the tool you're using for your HTML. Do you have any server-side code for your website (besides your HTML)?

As Zach mentioned you need to post your data back to your server. It's usually like this:

Form -> POST -> Server Code -> Database

Your server code will depend on what you've installed on your VPS (such as PHP, Perl, Python, Ruby on Rails, etc) as well as any software packages or frameworks your site uses (if any).

BTW, getting the data into your DB is half the battle. How are you going to get it out?

@Main Street James:

crewsta,

DW is the tool you're using for your HTML. Do you have any server-side code for your website (besides your HTML)?

As Zach mentioned you need to post your data back to your server. It's usually like this:

Form -> POST -> Server Code -> Database

Your server code will depend on what you've installed on your VPS (such as PHP, Perl, Python, Ruby on Rails, etc) as well as any software packages or frameworks your site uses (if any).

BTW, getting the data into your DB is half the battle. How are you going to get it out?
I'm not getting the datas out, I have my algorithm to deal with the data, so it's not pure I/O. Just need to deal with the input part

> I'm not getting the datas out, I have my algorithm to deal with the data, so it's not pure I/O. Just need to deal with the input part OK, what are you using to get the data out because that will point us in the right direction regarding what code/language/etc you should use to get it in.

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct