Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

database help on linux server

Status
Not open for further replies.

jrmorris1958

Programmer
Dec 20, 2002
4
0
0
US
i am fairly new to web design and i have a customer with a small company that would like the folowing items on his site but i have never worked with a linux server before....

his site has 4 different downloads
he would like to keep track of who is downloading what....

he wants the user to click on download link and that would take him to a form that is set up as follows:

already signed up.....login below

username___________
password_____________

if not sign up below

choose username____________
choose password____________
verify password____________

department/service name
contact name
title
email address
phone number(optional)
city
state
zip code

when the user clicks the submit button, he is taken to the download page....

he would like for a time/date to be auto inserted into the database along with the above info...also an auto reply should be sent to user welcoming them to site and telling the user his username and password.....and taken they to the page for downloads

then if a user comes back another time and wants to down load he wants it set up so they can just log in....

he also would like to be able to set up an administrator page that would allow him to query the database by clicking buttons for different info(ie...say he wants to find all the users from alaska he could use dropdown menu to choose state then click button and get that info from database)

he would like simalar setup for any query he might have based on above info categories......

does anyone know how to do all this.....or can someone point me to where i might find scripts that would accomplish these goals....

any help would be helpful.....as i said i have never work with anything but access databases and linux servers wont suppot access.......

thanks and sorry for the lengthy post....but i am desperate




 
WOW - that is a lot to do for a newbie.

I don't know of any scripts that I'd trust on my system. When I use code someone else has written, I like to review it to make sure it is secure and reasonably well written. After all, you don't want to open gaping security holes by installing flawed code and you will have to maintain this animal, so you want it to be as well behaved as possible. Obviously, the time pressure exerted by economics can be a factor in how long you have to get something going.

I'd Look at the system as having two basic chunks of functionality, the user interface and the database back-end. You'll need to make some decisions on what to do for each chunk.

I'd suggest backing up one step and ask a few questions:
1 - What other technologies you'r familiar with? Perl? ASP?
PHP? CGI? VB? M$ SQLServer?
2 - What kind of time schedule are you on?
3 - Do you know anything about database administration?
4 - Do you know anything about working with a *nix/linux
server?


About the user interface.......
If you're more familiar with the Micro$loth solutions and have played with ASP a little, then you might do better going to PHP instead of CGI. CGI will do everything you want, but if you are familiar with ASP, then PHP will be quicker/easier to pick up.

Which is better, PHP or CGI? It depends on what you're doing. There are a number of threads about just that. IMHO the crux of it is that PHP is easier when creating consistently styled web pages but is good for nothing else while the language you use to do your CGI (I like Perl) could be used for anything, web pages or anything (I wrote a GUI interface last night to pull the photos off of my digital camera onto my RH8 box). I lean toward CGI and can continue this conversation if you use Perl/CGI. If you go with PHP, there is a PHP forum that would be a better resource.

About the database backend........
The data-set you describe is very simple. My first inclination is to use a text file. The Perl DBI::DBD architecture has a Database Driver (DBD::CSV) that will let you treat a comma delimited text file like an SQL database. You open the file and then use plain vanilla SQL to work with the data. With a little simple file locking, the DBD::CSV approach would be sufficient for at least several thousand hits per day on a modest server. If the text file approach is insufficient, on a linux server you may already have MySQL or PostgreSQL on the system. Either would be a sufficient and appropriate database backend. MySQL is a little simpler, PostgreSQL has more bells an whistles. If one of them is not already there, they are free on the web.

The text file approach has the advantage that you won't have to setup and manage a database server (not trivial). I have a Perl/CGI DBD::CSV bibliography search tool with about 1000 records in it that returns its pages in less than two seconds. Most of that time is web server lag and not data access time. The database server approach has the advantage of speed and greater flexibility and scalability. If your going to have thousands or records or heavy web traffic load, I'd use MySQL or PostgreSQL. If you do go with and database server (MySQL or PostgreSQL or other), then you'll need to figure out how to deal with administering the thing. It is not hard, just another decent size knowledge/skill set to learn.

You need to make some basic architecture decisions in order to begin to design the pieces-parts. The things I'd explore are PHP, CGI, Perl, the Perl DBI, and MySQL (and the Apache web server, if that is what is on the Linux box).

Next step for me (if I were you) would be into the front door of a book store. There are quite a few books on doing just the type of stuff you describe on the web. 'hope this helps

If you are new to Tek-Tips, please use descriptive titles, check the FAQs, and beware the evil typo.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top