P.Z. Low Cost CPanel Web Hosting  

Go Back   P.Z. Low Cost CPanel Web Hosting > Page-Zone Web Hosting Main Forum > General FAQ > General Questions and Comments

General Questions and Comments Post your question or grace us with your knowledge. Posting limited to registered members.

Reply
 
LinkBack Thread Tools Rate Thread Display Modes
Forms handling
Old
  (#1 (permalink))
lanesharon
Registered User
lanesharon is on a distinguished road
 
lanesharon's Avatar
 
Status: Offline
Posts: 48
Join Date: Nov 2002
Location: AZ & NY
Rep Power: 40
Question Forms handling - 11-05-2002, 01:18 PM

Be gentle with me guys because I am brand new at ALL of this. I am setting up pages and need to process a 'contact us' form. I have tried to use just an email option, but then I miss out on a number of email platforms. I only know HTML in a limited amount but I have used Front Page 2000 to generate the pages and made some changes here and there.

I tried to teach myself some basic info on cgi and I believe I have a good template set up for the form. My problem is that I don't seem to have the cgiemail and echo modules in my cgi bin. Can someone tell me how I can do that or give me an easy way to process this form? The form can be found here:

http://www.rare-cancer.org/contactus.html

The template text file is here and is installed in my cgi bin:

To: sharon.lane@rare-cancer.org
Subject: Rare Cancer Website
From: [email]

Type of message? [MessageType]
What is the subject? [Subject]
Comments? [Comments]
Your name? [Username]
Your email? [email]
Alt email? [AltEmail]
Phone #? [Phone]

Any and all help will be greatly appreciated.


Take Care, Sharon
   
Reply With Quote
forms
Old
  (#2 (permalink))
stratplan
Registered User
stratplan will become famous soon enough
 
stratplan's Avatar
 
Status: Offline
Posts: 706
Join Date: Sep 2002
Location: Texas, USA
Rep Power: 74
Lightbulb forms - 11-05-2002, 03:23 PM

there is a good 'how to' in the cgiemail part of cgi scripts in Cpanel.

I recommend you DO NOT use the FormMailclone in the same section. Matt's FormMail has had some security problems, but cgiemail hasn't.

I see the good Ol' MS Frontpage did its thing with the "WEBBOT" - i.e. it hid the actions so one doesn't know how it is playing with FrontPage extensions, nor can change them.

When I use cgiemail, it looks like this:
<FORM METHOD="POST" ACTION="/cgi-bin/cgiemail/mailtemp.txt">

with mailtemp.text being the template page.


stratplan
Click Here to Visit Page-Zone's Help Desk
Help find disease cures: FoldForCures
   
Reply With Quote
Old
  (#3 (permalink))
lanesharon
Registered User
lanesharon is on a distinguished road
 
lanesharon's Avatar
 
Status: Offline
Posts: 48
Join Date: Nov 2002
Location: AZ & NY
Rep Power: 40
Question 11-05-2002, 04:25 PM

I appreciate your trying to help me statplan, but I do not have cgiemail in my control panel for Scripts. My scripts menu includes only these items.

Interchange Cart
Agora Cart
XMB Board
CGIwrap
Formmail

And if I go into my File Manager cgibin, I only show cart.cgi there. Is there something wrong?


Take Care, Sharon
   
Reply With Quote
Old
  (#4 (permalink))
lanesharon
Registered User
lanesharon is on a distinguished road
 
lanesharon's Avatar
 
Status: Offline
Posts: 48
Join Date: Nov 2002
Location: AZ & NY
Rep Power: 40
Question 11-05-2002, 06:27 PM

Just wanted to add one more thing, my cpanel looks just like the one that Jim posted back in July. I don't see any cgiemail on it. I have tried every combination of action file names I could find documented on this site, I still can't get this.

http://page-zone.com/forums/showthre...=cpanel+upload

If anyone here, hosted by page-zone, uses cigemail for forms handling, can you please send me the lines that you put in your HTML for the forms input statements for the forms handling using cgiemail (x out your domain name stuff of course). Or privately email me your website so that I can view your source code. Or any solution that can let me finally put this page to rest. Thanks.


Take Care, Sharon
   
Reply With Quote
dangerous ground...
Old
  (#5 (permalink))
stratplan
Registered User
stratplan will become famous soon enough
 
stratplan's Avatar
 
Status: Offline
Posts: 706
Join Date: Sep 2002
Location: Texas, USA
Rep Power: 74
Wink dangerous ground... - 11-05-2002, 07:15 PM

gotta make some assumptions here, Sharon. I hoping you have the reseller plan:

If you don't have the reseller plan this is probably not valid:

Set up the site to have 'bluelagoonadvanced' panel. It should (mine does) include the things I talked about.

If you ftp into your public_html folder, in your cgi-bin folder, if it's lke mine, has:
cart.cgi
cgieecho.cgi
cgiemail.cgi
entropybanner.cgi
randhtml.cgi

So cgiemail should work. Obviously if it isn't in your cgi-bin folder, it won't.

Let me know what you find out. I'll try to walk you through it.


stratplan
Click Here to Visit Page-Zone's Help Desk
Help find disease cures: FoldForCures
   
Reply With Quote
Another way to handle forms
Old
  (#6 (permalink))
prince
Registered User
prince is on a distinguished road
 
prince's Avatar
 
Status: Offline
Posts: 105
Join Date: Oct 2002
Location: Little Rock, AR
Rep Power: 44
Another way to handle forms - 11-05-2002, 07:27 PM

I'm just a beginner when it comes to php but I've been playing with form scripts. They are simple because the php form script will just read your form names as variables (if you put a $ on it

Here is another way to handle your form if you want to 'play' with php (if not - just skip this post
==========
I changed two lines in your form:

<form method=POST action="sendemail.php"><BR>
The action line to point to the little php script I wrote (see below for the sendemail.php script)

And I changed this line:

<INPUT TYPE=HIDDEN VALUE="sharon.lane@rare-cancer.org" name="mymail"><BR>
because the 'required-to' did not seem to work with "-" in the name - so I rename the variable to mymail

-----------
You will want to change'Subject' from CGIEMAIL Example Subject
==============

Then I wrote this code (HTML and php) and saved the file as sendemail.php (as pure ASCII text file of course). And I uploaded it to the same directory as the contactus so I didn't have to worry about path info in the 'action'

+++++++++
sendemail.php code
+++++++++

<html>
<head>
<title>Example Sendemail PHP Script</title>
</head>
<body>
<?php
if (!isset($Email) || !isset($mymail))
echo "<font size=6>Somebody Goofed</font>" ;

$message = "Type of message? $MessageType \n
What is the subject? $Subject \n
Comments? $Comments \n
Your name? $Username \n
Your email? $Email \n
Alt email? $AltEmail \n
Phone #? $Phone \n
";

$from = "From: $Email\r\n";
if ($mymail != "")
mail($mymail, $subject, $message, $from);
?>

<p align=center>
Thank You Info Here<br>I wasn't sure what to do with the variable 'success' so I just echo it here at an anchor tag:
<br><a href="<?php echo $success ?>"> Success </a>
</body>
</html>


***********
Site index: http://www.ibdprince.com
   
Reply With Quote
Old
  (#7 (permalink))
lanesharon
Registered User
lanesharon is on a distinguished road
 
lanesharon's Avatar
 
Status: Offline
Posts: 48
Join Date: Nov 2002
Location: AZ & NY
Rep Power: 40
Thumbs down 11-05-2002, 08:35 PM

Sorry, I don't have the resellers package. And it seems that all I do have in my cpanel files is the formmail package. But when I click on it, I am taken to a page that just says that I am able to use it. It is not a page that allows me to 'activate' it. I do not show a cgiemail anywhere in any of my domain folders. I thought, from what I read that it was a system file, not necessarily in each domain. This is what I read on it in Page-Zone's documentation:
http://controls.page-zone.com/CGIEMail.htm

I have the impression that my account is a whole lot different then yours. I have tried asking support, but I have gotten no replies. So, I am at a standstill on that page. Thanks.


Take Care, Sharon
   
Reply With Quote
there you have it!
Old
  (#8 (permalink))
stratplan
Registered User
stratplan will become famous soon enough
 
stratplan's Avatar
 
Status: Offline
Posts: 706
Join Date: Sep 2002
Location: Texas, USA
Rep Power: 74
Lightbulb there you have it! - 11-05-2002, 09:50 PM

I see that:
1) you aren't on the reseller program - that's OK
2) with the link you furnished, I see it is a system file, not in your cgi directory.

Follow the instructions given in the link you have for naming the POST line, etc.

Use the same file you have (the first message I think) just change that one line to call it from the cgi-sys (the SYS is the key) instead of cgi-bin and it will work. A sys file is on the server even if it doesn't show on your site. Means everyone can use it if they call it from the cgi-sys location.

If you need any help changing your POST line, let me know I and I or someone else can walk you through it.


stratplan
Click Here to Visit Page-Zone's Help Desk
Help find disease cures: FoldForCures
   
Reply With Quote
oops!
Old
  (#9 (permalink))
stratplan
Registered User
stratplan will become famous soon enough
 
stratplan's Avatar
 
Status: Offline
Posts: 706
Join Date: Sep 2002
Location: Texas, USA
Rep Power: 74
Red face oops! - 11-05-2002, 09:57 PM

I should have paid more attention to the first post: here is how your post line is now:

<form method=POST action="/cgi-sys/cgiemail/cgibin/template.txt">

Try this:

<form method=POST action="/cgi-sys/cgiemail/template.txt">

The cgibin is not needed, and would be cgi-bin anyway. Sorry I didn't see that sooner.


stratplan
Click Here to Visit Page-Zone's Help Desk
Help find disease cures: FoldForCures
   
Reply With Quote
Old
  (#10 (permalink))
lanesharon
Registered User
lanesharon is on a distinguished road
 
lanesharon's Avatar
 
Status: Offline
Posts: 48
Join Date: Nov 2002
Location: AZ & NY
Rep Power: 40
Thumbs down 11-06-2002, 08:43 AM

Thank you for that last reply, but it didn't work. I got an HTTP 500 internal server error trying to reach this page:
http://www.rare-cancer.org/cgi-sys/c...l/template.txt

(for some reason the forum software is truncating the cgiemail that resides in that line, but it is there where the ..... show)

And I think that may be caused by several things. I, personally, do not have a folder called cgiemail. Yet my template.txt file is actually in my cgi-bin folder on my account. But if cgiemail is available at all (and I am still not sure I have access to it regardless of what the page-zone documentation says), it resides at the server level. I am beginning to believe that I do not have access to any type of forms handling through cgi because of this apples and oranges situation. I am trying to marry a cgi program (cgiemail) that resides at the server level, with a template that resides at the user level. I doubt this can be done.

And I am not sure how I can handle this form otherwise. I guess, until I hear from Jim, I am at a total stand still. Thanks.


Take Care, Sharon
   
Reply With Quote
if at first, you don't succeed...
Old
  (#11 (permalink))
stratplan
Registered User
stratplan will become famous soon enough
 
stratplan's Avatar
 
Status: Offline
Posts: 706
Join Date: Sep 2002
Location: Texas, USA
Rep Power: 74
Question if at first, you don't succeed... - 11-06-2002, 09:49 AM

whoever said that? Anyway -

Here's a couple of suggestions: the error message said it was looking in the public_html directory - it is probably coded to look there.

You mentioned you had it in the cgi-bin directory? Try putting it in the public_html.

Also, one other thing that may or may not be important. the action POST in my templates is in quotes <action = "POST" ...etc>

Try making those changes and I think it will work. If not, we'll "try, try, again"


stratplan
Click Here to Visit Page-Zone's Help Desk
Help find disease cures: FoldForCures
   
Reply With Quote
Old
  (#12 (permalink))
lanesharon
Registered User
lanesharon is on a distinguished road
 
lanesharon's Avatar
 
Status: Offline
Posts: 48
Join Date: Nov 2002
Location: AZ & NY
Rep Power: 40
Thumbs up 11-06-2002, 10:10 AM

You're the MAN!!! It worked beautifully. Got emailed to me just fine. I will have to play with some things in the template file (and learn more about them) to get the recipients name and email sent with the email properly (the email I got was from "nobody"). Thanks so much for sticking in there with me and getting this resolved. I appreciate the patience you had with me. Thanks


Take Care, Sharon
   
Reply With Quote
glad to help...
Old
  (#13 (permalink))
stratplan
Registered User
stratplan will become famous soon enough
 
stratplan's Avatar
 
Status: Offline
Posts: 706
Join Date: Sep 2002
Location: Texas, USA
Rep Power: 74
Wink glad to help... - 11-06-2002, 11:00 AM

I think you'll find all the group here helpful and willing to share experiences...and Jim is really good on quick and complete answers.

Now, don't forget to jump in and help someone else when you can. Good luck.


stratplan
Click Here to Visit Page-Zone's Help Desk
Help find disease cures: FoldForCures
   
Reply With Quote