User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the HTML and CSS section within the Web Development category of DaniWeb, a massive community of 391,590 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,685 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our HTML and CSS advertiser: Lunarpages Web Hosting
Views: 3862 | Replies: 21
Reply
Join Date: Mar 2005
Location: Everett, Wa (sub. north of Seattle)
Posts: 54
Reputation: redsabre is an unknown quantity at this point 
Rep Power: 4
Solved Threads: 0
redsabre's Avatar
redsabre redsabre is offline Offline
Junior Poster in Training

cgi

  #1  
Mar 25th, 2005
Sorry if this is in the wrong forum, I couldn't figure out where to put it.

I am setting up a web form on my site to receive requests for services. Right now, because I don't know any other way, I am using the "mailto:" action to have the info from the forms sent to me. I would like to use cgi/perl (I think this is what I want) to have the info placed into a database. My web hosting package includes a "cgi bin" folder. I have messed around a little with setting up a guestbook, so I know it works, but what else do I need? I own OfficeXP and have MS Access. Can I link the info that is on my ISP server to a database on my computer?

Thanks,
David
(always willing/trying to learn)
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Feb 2005
Posts: 354
Reputation: DanceInstructor is an unknown quantity at this point 
Rep Power: 4
Solved Threads: 12
DanceInstructor's Avatar
DanceInstructor DanceInstructor is offline Offline
Posting Whiz

Re: cgi

  #2  
Mar 25th, 2005
I don't know perl, but I bet if you go to google and search for "perl contact form" you will find something to work for you in the first 5 or so results.

Uh oh I think we might get another forum :p at Dani
Clear Mind Hosting and Web Design

If I've helped you please consider adding to my reputation.
Reply With Quote  
Join Date: Dec 2004
Location: Lincoln Park, Michigan
Posts: 1,744
Reputation: Comatose is an unknown quantity at this point 
Rep Power: 7
Solved Threads: 107
Colleague
Comatose's Avatar
Comatose Comatose is offline Offline
Moderator

Re: cgi

  #3  
Mar 26th, 2005
I think that what you want to do, can not be done the way you want to do it. I researched a bit on using access with a Perl CGI, and this seems semi-possible, if the server that is hosting your CGI is running their server in windows with active perl. My guess is no, they are not. They are most likely using *nix system. Now, there is a solution to this, but it is probably more work than it's worth! Let me give you the break down.

You could have your Perl CGI Accept the user data, and write it to a database on the server, then you could even have it viewable to yourself on a web page. So you surf there, Log in, and view your "sign ups". Now to answer your actual question, you could build a program to connect to your server (through a number of means... FTP, HTTP, whatever), and retrieve that data from the server. That program then saves that data in an Access Database. So, User Enter Data, Server Saves The Data, A program on your computer requests the data, and saves it to an access database.
Reply With Quote  
Join Date: Mar 2005
Location: Everett, Wa (sub. north of Seattle)
Posts: 54
Reputation: redsabre is an unknown quantity at this point 
Rep Power: 4
Solved Threads: 0
redsabre's Avatar
redsabre redsabre is offline Offline
Junior Poster in Training

Re: cgi

  #4  
Mar 26th, 2005
I can do that! (can't I?) But what I need to figure out is (the hard part?)
...you could build a program to connect to your server (through a number of means... FTP, HTTP, whatever), and retrieve that data from the server.
Any idea where I need to start on that one??
Reply With Quote  
Join Date: Dec 2004
Location: Lincoln Park, Michigan
Posts: 1,744
Reputation: Comatose is an unknown quantity at this point 
Rep Power: 7
Solved Threads: 107
Colleague
Comatose's Avatar
Comatose Comatose is offline Offline
Moderator

Re: cgi

  #5  
Mar 26th, 2005
well, you start by coding the CGI. If you would like... if you give me the relevant information, I can code it, or help you code it. The harder part will be coding sockets on the window side to retrieve the said information.
Reply With Quote  
Join Date: Mar 2005
Location: Everett, Wa (sub. north of Seattle)
Posts: 54
Reputation: redsabre is an unknown quantity at this point 
Rep Power: 4
Solved Threads: 0
redsabre's Avatar
redsabre redsabre is offline Offline
Junior Poster in Training

Re: cgi

  #6  
Mar 26th, 2005
Originally Posted by Comatose
well, you start by coding the CGI. If you would like... if you give me the relevant information, I can code it, or help you code it. The harder part will be coding sockets on the window side to retrieve the said information.
That's an awful nice offer (to help me code it-I would never ask you to do it for me!)... wow. Is the CGI coding the *.cgi files that begin...

#!/usr/local/bin/perl
print ("Content-type: text/html\n\n");

...?

Right now I am in the self teaching mode and have found a few web sites that are helpful. If, however, I get totally bogged down I'll let you know. Thanks man.

So what I need first is to get the .cgi file up to my /cgi bin folder on my host server, then figure out how to get the info into a DB on my machine.
Reply With Quote  
Join Date: Dec 2004
Location: Lincoln Park, Michigan
Posts: 1,744
Reputation: Comatose is an unknown quantity at this point 
Rep Power: 7
Solved Threads: 107
Colleague
Comatose's Avatar
Comatose Comatose is offline Offline
Moderator

Re: cgi

  #7  
Mar 26th, 2005
Right.

It all starts in baby steps. Every project starts in baby steps. When I first started programming, I had huge aspirations. I would take on a real huge project, and kept straying from the purpose. I'd keep coming up with new things to add to it, and wanting to change everything. Eventually, though, I learned that in order to complete a project successfully, you need to do it in steps. So, Start with making the web page. Ok, that's done. Now, build the CGI, and have the CGI save the information into a file. My personal opinion, is that due to simplicity, you could save the information that the user enters in a textfile. This will make it a little easier for the program on your computer to read the information that the CGI saved. I prefer a flat file, delimited by _:_ or Tabs, but whatever works for you.

Yes, CGI's usually start with: #!/usr/bin/perl. I go about printing the header a little different (I import CGI.pm), but, again, this is a matter of preference. If you have any questions, don't hesitate to ask.
Reply With Quote  
Join Date: Mar 2005
Location: Everett, Wa (sub. north of Seattle)
Posts: 54
Reputation: redsabre is an unknown quantity at this point 
Rep Power: 4
Solved Threads: 0
redsabre's Avatar
redsabre redsabre is offline Offline
Junior Poster in Training

Re: cgi

  #8  
Mar 27th, 2005
Thanks Comatose. I will let you know. What you have shared already has been a great help, setting me off in the right direction. I do have a little experience importing data from delimited text files into an Access DB, so hopefully when I get to that point It'll all come back to me.

RS
Reply With Quote  
Join Date: Dec 2004
Location: Lincoln Park, Michigan
Posts: 1,744
Reputation: Comatose is an unknown quantity at this point 
Rep Power: 7
Solved Threads: 107
Colleague
Comatose's Avatar
Comatose Comatose is offline Offline
Moderator

Re: cgi

  #9  
Mar 27th, 2005
The hard part isn't importing the delimited text files into access. The hard part is getting the user entered information from the server to your PC. Once it's on your PC, you can have access import it, or make the program import it into access. Again, the tough part, is getting it from server to pc.
Reply With Quote  
Join Date: Feb 2005
Posts: 427
Reputation: autocrat is on a distinguished road 
Rep Power: 4
Solved Threads: 12
autocrat autocrat is offline Offline
Posting Pro in Training

Re: cgi

  #10  
Mar 27th, 2005
Sorry to interupt... but if you have a cgi based form on your site, have it use the mail functions send it to an e-mail account, then daily check the e-mail acount, strip the details and save as text files, then import? You can set up outlook or Outlook express to access the e-m,ail accounts....you can even set times to auto-check(I think!)....

There is even software out there to auto-strip emails for you, if you look hard enough!
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

DaniWeb HTML and CSS Marketplace
Thread Tools Display Modes

Similar Threads
Other Threads in the HTML and CSS Forum

All times are GMT -4. The time now is 11:18 pm.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC