PDA

View Full Version : Porgramming a MySql database


Barry441
3-2-09, 12:59 PM
newbie question here.

In the past I had a web page set up for the ship I was on in the Navy many moons ago. I had a form in which visitors who were shipmates could enter their information... name, email etc into the form and it would email the results to me and I would enter the info onto the page.

I am thinking I would like the info to be sent directly to a database that displays the information on the page instead of me having to manually do it but I have NO CLUE how to:
1) go about creating a database with all the tables and such to receive the input
2) display the info from the database on the page.

I'm also thinking it may not be a good idea to do it this way because anyone in the world could enter crap in the form and have it display on my page. Is there a way to "preview" info before it displays?

I guess this post falls under the multi-question category. :p Like I said... newbie.;)

entrecon
3-2-09, 01:12 PM
Have you worked with any databases before (i.e. Access)?

What type of coding, if any, are you familiar with (i.e. PHP)?

Barry441
3-2-09, 01:58 PM
No. I had to take an Access course back in '97 and it was the worst of all my computer classes. I'm not well versed in any coding but usually teach myself what I need through trial and error. The one thing I'm pretty good at is researching... if I look at existing code I can usually figure out what it is doing... it's the starting from scratch stuff that looses me.
:o

entrecon
3-2-09, 03:28 PM
I am guessing you are looking at a database with one table it (keep it simple). That table will have all of the fields (columns) in it ath you need (i.e. first name, last name, Rank, address, etc.). The form that you now send via e-mail will run against a script that will do an INSERT into the table. The page that you are now updating with the informtion will do a SELECT against the table to retrieve the appropriate information. You will want to make sure that your table has a field called something like "approved" that you will populate once you have approved the listing. You can either update it in the database, or create another secure page where you would do an UPDATE via a form page.

I would do a Google search for something like PHP MYSQL Tutorial and see if some of the code examples help. As an FYI, I do not believe that PowWeb allows you to create a database using code, you will have to do that part in OPS.

Barry441
3-2-09, 05:42 PM
Thank you entrecon. I'll be looking that up.