Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > CGI Form???

CGI Form???
Thread Tools
Forum Regular
Join Date: Nov 2000
Status: Offline
Reply With Quote
Oct 28, 2001, 10:30 PM
 
I want to design a Web page that includes a form. I am not very Web savvy, but I do know Dreamweaver and Flash quite well. Is there an easy way to create a CGI that would allow the Form to work? I called DellHost and they told me that I need to program one. Is there any software that help me do this? Or is it off to computer school to learn PERL? Any suggestions would be most appreciated. Thanks.
     
Mac Elite
Join Date: Oct 2000
Location: Baltimore, MD
Status: Offline
Reply With Quote
Oct 28, 2001, 11:07 PM
 
Try:

this

this

and this

good luck
nick
     
Forum Regular
Join Date: Nov 2000
Status: Offline
Reply With Quote
Oct 29, 2001, 10:58 AM
 
Thanks for your help. I downloaded a script and will try to get it to work tonight. Thanks again.
     
Dedicated MacNNer
Join Date: Jan 2001
Location: where?
Status: Offline
Reply With Quote
Oct 31, 2001, 11:57 AM
 
Actually, this is a real problem that has been driving me nuts for years. Because the truth is, he shouldn't have to know PERL,PHP or any CGI to make a form work properly.

There should be an application that ships with Dreamweaver or made by some third party that automaticlly generates the handler script for a form. You would simply define the form elements.

Example, You build a form in Dreamweaver. You then launch this AutoForm.app on OS 10. Then you open your form .and a prompt pops up asking how you want to handle results data.

You then can select which method of scripting you want. Do you want your form to create or use a Perl Script or an AppleScript etc.

You then have options for what you where you want the data to go. Do you want to have the data emailed to you as a text tabbed file or saved as a rtf attachment. Or you can have the data saved as an excel or filemaker pro file or into an existing filemaker pro or excel document.

It should be that easy. It should be clean, simple and practically brainless. Hell, OS 10.1 already includes the cgi script directory as well as php.

It has apache, which is great if your really into programming. I'm not. This app could work only with OS 10 and cost about a hundred for all I care. If it did all that, I'd snap it up in a second. I'm not the only one either.

Programming the script yourself will give you far more control. But, I would gladly give some of that up for something that is easy to use.
     
Occasionally Useful
Join Date: Jun 2001
Location: Liverpool, UK
Status: Offline
Reply With Quote
Oct 31, 2001, 12:30 PM
 
all you have to do, is get yourself a copy of FormMail.pl, upload it in ascii to a cgi-bin, chmod it to 755, then use something like this to call it from your html page:

<font face = "courier"> <font color = green>
&lt;form name="blah" method="post" action="http://www.yourhost.com/cgi-bin/FormMail.pl"&gt;
&lt;input type=hidden name="recipient" value="you@yourhost.com"&gt;
&lt;input type=hidden name="redirect" value="thanks.html"&gt;
</font></font>

the first time i had to handle forms, i was a bit spazzed out, but once you get to grips with what's going on, it's not so tough
"Have sharp knives. Be creative. Cook to music" ~ maxelson
     
Mac Elite
Join Date: Oct 2000
Location: Baltimore, MD
Status: Offline
Reply With Quote
Oct 31, 2001, 03:46 PM
 
You are right, it *should* be as easy as launching "Autoform.app" but **** , where is the technical skill in that? Forms are like tossing salad, it gets easier after time.


Oh dear god did I just equate perl with tossing salad? My bad.


Nick
     
Dedicated MacNNer
Join Date: Jan 2001
Location: where?
Status: Offline
Reply With Quote
Nov 1, 2001, 09:21 AM
 
Uh, I just discovered MacSQL. Nevermind. It'll do. Thanks.

MacSQL
     
Addicted to MacNN
Join Date: Sep 2000
Status: Offline
Reply With Quote
Nov 2, 2001, 10:44 AM
 
Originally posted by --Helen--:
<STRONG>Actually, this is a real problem that has been driving me nuts for years. Because the truth is, he shouldn't have to know PERL,PHP or any CGI to make a form work properly.

There should be an application that ships with Dreamweaver or made by some third party that automaticlly generates the handler script for a form. You would simply define the form elements.

Example, You build a form in Dreamweaver. You then launch this AutoForm.app on OS 10. Then you open your form .and a prompt pops up asking how you want to handle results data.

You then can select which method of scripting you want. Do you want your form to create or use a Perl Script or an AppleScript etc.

You then have options for what you where you want the data to go. Do you want to have the data emailed to you as a text tabbed file or saved as a rtf attachment. Or you can have the data saved as an excel or filemaker pro file or into an existing filemaker pro or excel document.

It should be that easy. It should be clean, simple and practically brainless. Hell, OS 10.1 already includes the cgi script directory as well as php.

It has apache, which is great if your really into programming. I'm not. This app could work only with OS 10 and cost about a hundred for all I care. If it did all that, I'd snap it up in a second. I'm not the only one either.

Programming the script yourself will give you far more control. But, I would gladly give some of that up for something that is easy to use.</STRONG>
Reasons why it isn't done:
1. There are many different servers, how do you support them all? Most, but not all like perl, some like PHP, some use MIVA or others....
2. Security - CGI's are known to have security problems if not done perfectly (and that definition is constantly changing with every PERL release) who wan'ts that liability?
3. Everyone wants something different.

You can just have a form sent using the webbrowsers mail client I think it is post="whatever@yourdomain.com" which of course brings up a security notice that it is mailing using the mail client. ... I believe this only works in some browser (most likely netscape) though I never really used it.
I always use protection when fscking my Mac... Do you?
     
Dedicated MacNNer
Join Date: Jan 2001
Location: where?
Status: Offline
Reply With Quote
Nov 2, 2001, 01:46 PM
 
Actually, to my suprise there are already many applications that run natively under 10 that will do what I'm asking. MacSQL and iForm are two that seem very easy to use and seem to be very extendable.

The downside to MacSQL is that it requires an MySQL based server. Ok how does that work? How do I set that up? Oh god, more of this major hardcore programming crapola that I want nothing to do with.

Option B: iForm (looks new) and requires minor Applescript based programming for real fireworks. Ok, that I can handle. I hope.

Still, the important thing is to recognize the need for simplicity. Most people do not want to be a programmer. Hell, that's why the Mac took off in the first place back in 1984. Most folks didn't want to know command prompts and commands.

I guess...

Hmm... Anyone remember using Pagemaker or Quark for the first time? It was like so unbeliveably easy, and perfect. I mean, no more glue guns and typewriters to do paste-up jobs. And it was all on this funny little box with Oscar singing and poping out of the trashcan. I loved that. Oscar must be carbonized!

But more than that, We used Pagemaker and Quark (still do) because it worked(s). Was it secure? Was it perfect? Who knows? It worked, that's what is important.

It's the same thing here. A turnkey solution that gradually over time gets updated with fixes, patches and whatnot. It's one thing to build a website. It's another to build it with forms so that people can get information and whatnot. An application for the rest of us mere mortals who just want to have webpages with forms.
     
Junior Member
Join Date: Oct 2001
Location: Oxford, OH
Status: Offline
Reply With Quote
Nov 2, 2001, 07:39 PM
 
Oh come on, learn Perl! You'll have a much more fun time than trying to hack scripts to work for you (well, you can do that too after you learn Perl...). If you want to program Perl for CGI, I reccommend the Visual Quickstart Guide: Perl and CGI for the World Wide Web by Elizabeth Castro. If you want to learn just plain Perl, which can do a lot for you too, pick up a copy of O' Reilly's Learning Perl.

Have fun
     
Dedicated MacNNer
Join Date: Jan 2001
Location: where?
Status: Offline
Reply With Quote
Nov 5, 2001, 08:53 AM
 
     
Junior Member
Join Date: Oct 2000
Location: New York, NY USA
Status: Offline
Reply With Quote
Nov 30, 2001, 02:32 PM
 
The other reason you can't have generic form handler, is that "handling" a form is not a defined thing. For instance, I use python to handle lots of CGI data to pass to/from an Oracle database in one application suite on a ultrix box. In another I use PHP to talk to mySQL on my OSX box. On another I use CDML to talk to a filemaker db running on a macOS box. On another I talk directly to send-mail via python...

For a non-programmer, learning these languages is non-trivial. Also, you have to learn the libraries to do all the things you want to do with your data (i.e. talk to a RDB, email...). Remember, all of us who program, find them easy to pick up, as they are similar to other languages we've used before. Try picking up a 360 assembler program some time (no stack, ebcidic...) and it seems pretty confusing . If all you've ever done is some excel macros or such, learning python, php or perl is pretty intimidating. Also as someone pointed out, doing it wrong, leaves gaping security holes in a server.
Henry Feldman, MD
NYU School of Medicine
     
Mac Elite
Join Date: Sep 2001
Location: the intarweb
Status: Offline
Reply With Quote
Dec 4, 2001, 05:05 AM
 
if your server supports PHP [built into OS X for fun web dev on your own machine!] you could write your form page in that in about 5 mins. PHP has support for taking data from forms and using the server's built in mail system.

as long as you name the elements in your form eg. &lt;input name="something" ...&gt; then whatever the user enters in those boxes is sent as a variable called $something to wherever the form goes when submit is pressed. so it's a piece of piss to make a form in PHP.

here's a quick'n'dirty demo of how easy it is......

page 1 [with the form on] called 'register.php'

<BLOCKQUOTE><font size="1"face="Geneva, Verdana, Arial">code:</font><HR><pre><font size=1 face=courier>
&lt;form name=<font color = red>"some dumb form"</font> action=<font color = red>"register2.php"</font> method=<font color = red>"post"</font>&gt;

<font color = brown>///// ie. click this form and we'll go to page register2.php ///////</font>

&lt;b&gt;1st name:&lt;/b&gt;&lt;input type=<font color = red>"text"</font> name=<font color = red>"firstname"</font> size=<font color = blue>25</font> maxlength=<font color = blue>25</font>&gt;

&lt;b&gt;family name:&lt;/b&gt;
&lt;input type=<font color = red>"text"</font> name=<font color = red>"surname"</font> size=<font color = blue>25</font> maxlength=<font color = blue>25</font>&gt;

&lt;input type=<font color = red>"submit"</font> value=<font color = red>"keep me posted!"</font>&gt;

<font color = brown>///// when filled in the form will send the info as variables $firstname and $surname to register2.php ////////</font>
</font>[/code]


and then 'register2.php' the page you send the user to after they submit the form......

<BLOCKQUOTE><font size="1"face="Geneva, Verdana, Arial">code:</font><HR><pre><font size=1 face=courier>
thank you &lt;b&gt;&lt;?php echo ($firstname); ?&gt; for registering an interest in blah blah&lt;/p&gt;

<font color = brown>////// will print thank you fred [or whatever] using the value in $firstname passed from the form ///////</font>

&lt;?php mail(<font color = red>"dvwannabe@wherever.com"</font> , <font color = red>"subject for the email"</font> , <font color = red>"first name= $firstname \n surname= $surname "</font> );
?&gt;

<font color = brown>///// easy peasy built in mail function- mail(<font color = red>"to"</font>, <font color = red>"subject"</font>, <font color = red>"message"</font>) - sends you the info they have filled in ////////</font>
</font>[/code]

OK i wrote this from memory, so cue someone to point out the glaring syntax error[s]

[ 12-04-2001: Message edited by: m a d r a ]
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 12:48 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2