Current location: Hot Scripts Forums » Programming Languages » Perl » cgi form help


cgi form help

Reply
  #1 (permalink)  
Old 04-28-09, 08:14 AM
kipaqra kipaqra is offline
Newbie Coder
 
Join Date: Apr 2009
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
cgi form help

Hi

I am new to cgi and need a little help on where I am going wrong. I have the basic html form sat with my perl script and thankyou html file in a cgi-bin directory on the server as instructed by my server suppoirt team. I have set the permission to 775 as instructed (owner read-write-execute)

basic html form
<form action="/cgi-bin/formmail.pl" method="post">
<input type="hidden" name="recipient" value="webmaster@elizabeth-lewis.co.uk"/>
<input type="hidden" name="subject" value="basic cgi form"/>
<input type="hidden" name="required" value=""/>
<input type="hidden" name="redirect" value="thankyou.html"/><table>
<tr>
<td>What is your name:</td>
<td><input type="text" name="name" /></td>
</tr>

<tr>
<td>What is your email address:</td>
<td><input type="text" name="email" /></td>
</tr>

<tr>
<td colspan="2"><input type="submit" /></td>
</tr>
</form>

I am using Matt Script Archive "formail.pl"

FormMail, Version 1.92, Matt Wright, mattw @scriptarchive. com

I have amended the following:

@referers = ('www.elizabeth-lewis.co.uk');

@recipients = &fill_recipients('^webmaster\@elizabeth-lewis\.co\.uk');

when I run the script from my webpage on the server, I get the following message:

Error: Bad/No Recipient
There was no recipient or an invalid recipient specified in the data sent to FormMail. Please make sure you have filled in the recipient form field with an e-mail address that has been configured in @recipients. More information on filling in recipient form fields and variables can be found in the README file.


As far as I can tell, I am doing everything right but I still the the same message.

Can anybody help?
Reply With Quote
  #2 (permalink)  
Old 04-28-09, 10:56 AM
End User's Avatar
End User End User is offline
Level II Curmudgeon
 
Join Date: Dec 2004
Posts: 3,027
Thanks: 14
Thanked 35 Times in 33 Posts
Try changing this line:

@recipients = &fill_recipients('^webmaster\@elizabeth-lewis\.co\.uk');

to this:

@recipients = &fill_recipients('webmaster@elizabeth-lewis.co.uk');
__________________
I don't live on the edge, but sometimes I go there to visit.
-------------------------------------------------------------------------
Sanitize Your Data | Oracle Date & Substring Functions | Code Snippet Library | [url=http://www.codmb.com/Call Of Duty[/url]
Reply With Quote
  #3 (permalink)  
Old 04-28-09, 03:01 PM
kipaqra kipaqra is offline
Newbie Coder
 
Join Date: Apr 2009
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
the ^ and \ characters are the new format for the recipient as told in the latest update. I have tried to change to the format you suggested but I still get the same no recipient or an invalid recipient error.
Reply With Quote
  #4 (permalink)  
Old 05-03-09, 07:04 AM
bear bear is offline
Newbie Coder
 
Join Date: Apr 2009
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by kipaqra View Post
<input type="hidden" name="recipient" value="webmaster@elizabeth-lewis.co.uk"/>

@recipients = &fill_recipients('^webmaster\@elizabeth-lewis\.co\.uk');
I have an older version of the secured FormMail I occasionally use, and the syntax is very different. I'd suggest trying without the XHTML ending "/>" in the hidden input. Can you point to where you got the newer version so I can have a look?
Reply With Quote
  #5 (permalink)  
Old 05-27-09, 09:08 PM
kipaqra kipaqra is offline
Newbie Coder
 
Join Date: Apr 2009
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
I have sorted out the formmail script problem. Thanks to all for your help.
Reply With Quote
Reply

Bookmarks


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

Posting 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 Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
ajax checking and onsubmit issue follower JavaScript 4 10-12-08 03:45 PM
Creating Calculating CGI Email Form jclanin New Members & Introductions 3 06-29-05 07:29 PM
CGI Script Form to Email Help!!! EOM Perl 1 06-22-05 12:19 AM
Help with cgi form (conditional statement) solrac25 Perl 1 09-11-04 12:32 PM


All times are GMT -5. The time now is 04:52 AM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.