homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / WebmasterWorld / New To Web Development
Forum Library, Charter, Moderators: brotherhood of lan & mack

New To Web Development Forum

how to set up a simple database?
need to start learning I guess

 12:34 am on Jul 12, 2007 (gmt 0)

I can't seem to find a script for this, but maybe I have not looked hard enough.

I need a user on my site to be able to fill in 2 fields on my site and if they match, return a third field.

basically it would be their Last Name and Zip code, if this matched it would show the expiration date of their membership.

the database would just be the 3 fields and maybe 2000 records.

I just don't know where to start on this.

my webhost has MySql, PHP, etc.

(note: this is related to a club membership that is not web-based, people get a magazine and want to have a simple way to find out when it expires. Right now they send emails or call me even though it is actually printed on their magazine)



 5:49 am on Jul 12, 2007 (gmt 0)

First you need to know how to deal with forms with PHP. Here's a good place to start: Dealing with Forms [us.php.net].

Next you need to setup a table in your database. Refer here: create table syntax [dev.mysql.com]. If you have phpmyadmin this process is easier.

After that you need to know how to 'talk' to mysql with php. For that, we have a few great threads in the php forum library that should get you moving along. Here are a few:
basics of extracting data from mysql [webmasterworld.com]
commonly used mysql commands [webmasterworld.com]

And don't forget to check the documentation at php.net and mysql.com. That shold get you started.

Happy coding ;)

Matt Probert

 9:32 am on Jul 12, 2007 (gmt 0)

Use Mysql for a three field, 2000 record, single dataset file?

That's like using a Ferrari to ferry the children one mile to school, very expensive, and excessive.

You can just use a simple text flat file, one record per line and separate the fields with a simple delimiter. Very fast, very simple.



 3:37 pm on Jul 12, 2007 (gmt 0)

I would be happy to use a simple flat file as I just export the info I need out of Filemaker, but once I have the flat file, I don't know what to do with it.?
I remember I asked this question once before someplace and one answer was to post all the info as a single HTML web page and then draw on that, but I could not get anyone to explain how.
Apparently it is so simple that it cannot be explained.

I only mentioned that MySql and PHP are installed on my webserver in case anyone asked. If I can avoid using MySQL, that would be great.
I just use that for the premade forum and photoposting programs that I installed. All the heavy lifting is done.

I will look at the "Dealing with Forms" link, thank you.
I am viewing this as a learning experience so I plan to start *very* small and work my work my way up. Its a hobby job, not a work job.


 7:05 pm on Jul 12, 2007 (gmt 0)

If you are going to use a CSV file PHP comes with a nice little function: fgetcsv [us.php.net].

There is a nice thread in the library: the basics of extracting data from a csv file [webmasterworld.com].

Global Options:
 top home search open messages active posts  

Home / Forums Index / WebmasterWorld / New To Web Development
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved