Welcome to WebmasterWorld Guest from 184.73.3.107

Forum Moderators: coopster & jatar k

Help with forms

   
10:38 am on May 1, 2013 (gmt 0)



Hello all,

Sorry If i'm in the wrong place and sorry if i'm asking too much.

I have a html form that I need to insert/retrieve data to a local mysql database.

Can anyone offer me some advice on how to get the form to r/w to Mysql?
3:25 pm on May 1, 2013 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Storing form submission data in a database isn't terribly complicated on a fundamental level. You start by creating a database that has a table with fields that correspond to the form fields. Then your PHP scripts simply gather the form submission data and handles the interaction with the database server to store and retrieve that data as needed. But things do get a bit complicated when you start to consider issues like website security, form data validation, data formats, and a handful of other issues.

I'd suggest that you search for PHP tutorials on forms and MySQL. That will get you started. Once you have the basics down, you can investigate some of these other topics.
3:44 pm on May 1, 2013 (gmt 0)



Thanks that's the sort of guidance i need.

I know roughly what i need to do just don't know how to put it in to practice and seen that i haven't done it before I dont know for sure that i'm getting all the elements right.

I have prepped my Mysql database with the correct database and fields, I just need to read up on some php to figure out how to get my data in there.

Quick question, from what i gather i can do the same thing with ASP, is this correct? and is there a reason PHP would would be preferable?
5:38 pm on May 15, 2013 (gmt 0)

5+ Year Member



Two different systems, ASP runs on Windows servers, PHP runs on linux. On a basic form there's no huge difference, just comes down to personal preference.
5:38 pm on May 15, 2013 (gmt 0)

5+ Year Member



Two different systems, ASP runs on Windows servers, PHP runs on linux. On a basic form there's no huge difference, just comes down to personal preference.
10:09 pm on May 15, 2013 (gmt 0)

WebmasterWorld Senior Member swa66 is a WebmasterWorld Top Contributor of All Time 10+ Year Member



Since you're learning, make sure to use the mysqli (note the i) interface, not the obsolete mysql (note the lack of the i) interface. I'd invest a bit of time to fully get to grasps with prepared statements - they make it a lot easier to get rid of sql injection problems.

BTW: PHP is available on windows platforms as well.
7:58 pm on May 16, 2013 (gmt 0)

5+ Year Member



On Windows platforms yes, but not windows servers right?
9:07 pm on May 16, 2013 (gmt 0)

WebmasterWorld Senior Member swa66 is a WebmasterWorld Top Contributor of All Time 10+ Year Member



You can run php under IIS on windows servers (that's what I meant by windows platform).

See here for instructions on how to do it manually: [php.net...]
See here for an msi installer: [php.net...]

Not that I've done so: "I don't do windows"
 

Featured Threads

My Threads

Hot Threads This Week

Hot Threads This Month