Reply

Join Date: Mar 2005
Posts: 55
Reputation: redsabre is an unknown quantity at this point 
Solved Threads: 0
redsabre's Avatar
redsabre redsabre is offline Offline
Junior Poster in Training

cgi

 
0
  #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)
Reply With Quote Quick reply to this message  
Join Date: Feb 2005
Posts: 355
Reputation: DanceInstructor is an unknown quantity at this point 
Solved Threads: 14
DanceInstructor's Avatar
DanceInstructor DanceInstructor is offline Offline
Posting Whiz

Re: cgi

 
0
  #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 Quick reply to this message  
Join Date: Dec 2004
Posts: 2,413
Reputation: Comatose is a jewel in the rough Comatose is a jewel in the rough Comatose is a jewel in the rough Comatose is a jewel in the rough 
Solved Threads: 211
Team Colleague
Comatose's Avatar
Comatose Comatose is offline Offline
Taboo Programmer

Re: cgi

 
1
  #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 Quick reply to this message  
Join Date: Mar 2005
Posts: 55
Reputation: redsabre is an unknown quantity at this point 
Solved Threads: 0
redsabre's Avatar
redsabre redsabre is offline Offline
Junior Poster in Training

Re: cgi

 
0
  #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 Quick reply to this message  
Join Date: Dec 2004
Posts: 2,413
Reputation: Comatose is a jewel in the rough Comatose is a jewel in the rough Comatose is a jewel in the rough Comatose is a jewel in the rough 
Solved Threads: 211
Team Colleague
Comatose's Avatar
Comatose Comatose is offline Offline
Taboo Programmer

Re: cgi

 
0
  #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 Quick reply to this message  
Join Date: Mar 2005
Posts: 55
Reputation: redsabre is an unknown quantity at this point 
Solved Threads: 0
redsabre's Avatar
redsabre redsabre is offline Offline
Junior Poster in Training

Re: cgi

 
0
  #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 Quick reply to this message  
Join Date: Dec 2004
Posts: 2,413
Reputation: Comatose is a jewel in the rough Comatose is a jewel in the rough Comatose is a jewel in the rough Comatose is a jewel in the rough 
Solved Threads: 211
Team Colleague
Comatose's Avatar
Comatose Comatose is offline Offline
Taboo Programmer

Re: cgi

 
0
  #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 Quick reply to this message  
Join Date: Mar 2005
Posts: 55
Reputation: redsabre is an unknown quantity at this point 
Solved Threads: 0
redsabre's Avatar
redsabre redsabre is offline Offline
Junior Poster in Training

Re: cgi

 
0
  #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 Quick reply to this message  
Join Date: Dec 2004
Posts: 2,413
Reputation: Comatose is a jewel in the rough Comatose is a jewel in the rough Comatose is a jewel in the rough Comatose is a jewel in the rough 
Solved Threads: 211
Team Colleague
Comatose's Avatar
Comatose Comatose is offline Offline
Taboo Programmer

Re: cgi

 
0
  #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 Quick reply to this message  
Join Date: Feb 2005
Posts: 427
Reputation: autocrat is on a distinguished road 
Solved Threads: 12
autocrat autocrat is offline Offline
Posting Pro in Training

Re: cgi

 
0
  #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 Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the HTML and CSS Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC