Welcome to WebmasterWorld Guest from 54.196.153.46

Forum Moderators: coopster & jatar k

Message Too Old, No Replies

Help with forms

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

New User

joined:May 1, 2013
posts: 2
votes: 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)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Apr 15, 2003
posts:928
votes: 21


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)

New User

joined:May 1, 2013
posts: 2
votes: 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)

New User

5+ Year Member

joined:June 24, 2009
posts: 27
votes: 0


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)

New User

5+ Year Member

joined:June 24, 2009
posts: 27
votes: 0


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)

Senior Member

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

joined:Aug 7, 2003
posts:4783
votes: 0


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)

New User

5+ Year Member

joined:June 24, 2009
posts: 27
votes: 0


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

Senior Member

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

joined:Aug 7, 2003
posts:4783
votes: 0


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"
 

Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members