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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

anyone know anything about CGI and web forms in here?? i need help!

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
Ok..This has been pissing me off for the longest time..All i want is to have a form on my site take the information someone has submitted, organize it into sperate lines, and then email the data to my email! I do not know how to make it send the information to my email, let alone get the stupid thing to work.

now-a-days every site u go to has a form and i want to know how to get one to work. Now this form sends its information to a CGI script and then the script sorts or "parses" the information.
i have a test form setup here but everytime it says &quot;timed out&quot; <a href=&quot; HERE FOR TEST FORM</a>

I really appreciate any help u guys can provide for me.
(if u need additional info just ask)
HERE IS THE CGI SCRIPT FOR THE FORM:

#!/usr/local/bin/perl

require &quot;subparseform.lib&quot;;
&Parse_Form;

print &quot;Content-type:text/html\n\n&quot;;
print &quot;<P>Hi, $formdata{'name'}, i hope this works&quot;;
 
Hello visitor,
'need a little information first.....can you tell me where it hurts.....;^) Sorry lapsed into a Floyd moment there.

But, really.
What OS are you writing code on?
What OS are you running the code on? Appears from the first line to be *NIX?
Do you have telnet access to the system it is running on?
Can you see the Web server logs to see if they hold any meaningful info?
How familiar are you with Perl?
Do you have subparseform.lib on your system (is the require working?)?
ETC......
 
Im on win95, this is all taking place on tripod's servers so it is setup correctly when ur talking about the server problems because they have a supplied my with a cgi-bin so i know they support cgi-scripts

No i do not have telnet access, at least im pretty sure i dont.
I dont not have access to the text log files
I am very new to perl, i have purchased a book but ALL i want is to be able to make a form that sorts and sends the data to me.
yes i have subparseform.lib, i did not write it, i got it off of the book that i purchased website and can be downloaded here
How do i check to see if the &quot;require&quot; is working?

i really appreciate u giving me help and im sorry im such a newbie at this but i really want to learn how to make this darned thing work ;)..so please respond. THX
 
OK, let's start at the beginning. Let's try to get a very simple CGI chunk to run on the server.
Cut and paste the code below into a file. Change the first line to point at the Perl installation on the server. Save it as something like 'simple.cgi'.
[tt]
#!/usr/local/bin/perl
print &quot;Content-type: text/html\n\n&quot;;
print &quot;<HTML><HEAD><TITLE>A NEW CGI PAGE</TITLE></HEAD>\n&quot;;
print &quot;<BODY><P>Here is the text I want to see</P></BODY></HTML>&quot;;
[/tt]

When you move the file onto the server, you will need to convert the file from a DOS file to a UNIX file. That simply means that you need to replace the DOS line endings (carriage return and line feed) with UNIX style ending (just a line feed). Most GUI FTP clients will let you specify conversion as the FTP is performed. If yours does not, try getting WS_FTP (just search google for it). You will also need to set the execute bits on the file once it is on the server. That also can be done with many of the available GUI FTP clients. If your FTP client software will not support that, then you need to check with Tripod about how they expect you to do it. Again, WS_FTP works.

Once all that is done, you should be able to go to
and you should get the text &quot;Here is the text I want to see&quot;.

All that having been worked through, you will then be successfully running a CGI script on the Tripod server. Getting you email thing to work is just a matter of adding code to that general CGI pattern.

BIG Beware - make sure that you do a little reading on security issues. Putting input fields in a web page for people to type in opens some huge doors to hackers. Be sure you have pushed the door as far back shut as possible. My suggestion would be to get you feet wet with the long hand approach to writing CGI stuff. Then, where possible, use CGI.pm. It does a fair amount of sniffing input to make sure it is safe.

a little light reading....

'hope this is helpful.....
 
Uh o...i i uploaded the simple.cgi and tried to chmod it using ws_ftp and it said it failed..messa thinkin tripod isnt a unix server.. is that possible?
 
hmmm......
im reading up on the &quot;tripod CGI&quot; and they say i dont need a shebang line and they say they have their &quot;own&quot; mail script so i cant use sendmail scipts...

I think the problem is tripod not me :(

Do u know if xoom is a UNIX based server?
 
hey, where can i find the cgi.pm script to download?..i was looking at the perl site and i went undr downloads but it was explaining the script (and i understood nothing).. i just want to download it.
 
>>..messa thinkin tripod isnt a unix server.. is that possible?
Yes, that is possible. It should be stated specifically somewhere in their docs.

>>Do u know if xoom is a UNIX based server?
No idea.

>>where can i find the cgi.pm script to download?
CGI.pm is a Perl module. It is freely available from and and I assume that you want to install it on you Win95 box. The best way to do that is to use activestate's ActivePerl (Win32 port of Perl) which comes with some nifty tools. Just go to find the download you want and follow the directions. After the download, you can have Perl 5.6 running on your 95 box in < 15 minutes. Once you have the ActiveState bundle, you will have their Perl Package Manager (PPM). PPM make installing new modules very simple. Type 'PPM' at a DOS prompt - PPM will start. Type 'install CGI' (maybe 'install CGI.pm', can't remember) at the PPM prompt and wait as it finds the module on ActiveState's server, downloads it, and installs it.

If this is a little to much to get into, find someone who writes Perl and can do it for you.

'hope this helps.
 
hey..thx alot goBoating..u r a truely nice guy for helping a newbie like me.

but hey we all have to start somewhere..right? ;)

just wanted to thank you for your help and support

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top