473,888 Members | 1,336 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

I wan't to lose the HTML reply page, please can you help

9 New Member
Firstly this is my first post so thanks in advance for any help.

I have created a form in my web page using Flash and all the variables seem OK. So now I have set up the CGI form on my web server (to respond to the enter button) using Matt Wrights script (I know NMS is better from research but my host demands I use their Matt's formmail script so I am stuck with it).

So my question is I want to lose the the HTML page that pops up when I fill in my form and press the enter button and just have the variables(custo mer info) returned directly to my e-mail in-box.

As far as I can tell this is something I must fix in the PERL script so if anyone could start of the discussion and start pointing me in the right direction I would appreciate it.

I am newer to PERL than I am to actionscript so if anyone feels I should move this to the Flash section please let me know, but as far as I can make out it's the PERL script that generates the return HTML page so here I am.

I haven't uploaded the site yet because I don't want a form that doesn't return the data.

Any info would be appreciated.

If I can attach any specific code to a reply that would shine light on my problem I'll be glad to.

Thanks again.

Cheers.

D.
Oct 12 '07 #1
12 1776
eWish
971 Recognized Expert Contributor
Does Matt's site offer support for his scripts? That is where I would start.

Before anyone can help you; you will need to post the relevant code where this is being done in the perl script.

When posting code please sue the [code] [ /code] tags. Thanks!
Oct 12 '07 #2
KevinADC
4,059 Recognized Expert Specialist
Does Matt's site offer support for his scripts? That is where I would start.

Before anyone can help you; you will need to post the relevant code where this is being done in the perl script.

When posting code please sue the [code] [ /code] tags. Thanks!

Matt himself recommends you don't even use his old scripts anymore, let alone support them.
Oct 12 '07 #3
eWish
971 Recognized Expert Contributor
I agree...I have heard many horror stories about them...
Oct 13 '07 #4
DMcN
9 New Member
Hi, thanks to all for replying to my post so quickly.

I've posted the code after my reply, changing details where appropriate.

I guess I'm having to re-think how I am going to approach my objective.

I suppose my new question would now be, if I want to simply have my flash form results e-mailed directly to my in-box without any HTML what would be the best type of code to use PHP etc. I don't want to change my flash form vastly if possible, but have the variables e-mailed to me.

I have no coding knowledge (other than actionscript) so all suggestions will be welcome and any form of scripting that I could get to complete my objective, but do by myself, would be great.

I've put my current code below in-case anyone can point out how I can fix my problem with what I currently have at hand (not having an HTML page returned when hitting the enter button on my form as well as not receiving the results from the form).

Thanks again for all your help.

P.S. I had to lose the bottom section of the code because it wouldn't let me submit otherwise, if there is a particular section of code I should post please let me know and I will re-post.

D.

Expand|Select|Wrap|Line Numbers
  1.  
  2. #!/usr/bin/perl
  3. ##############################################################################
  4. # FormMail                        Version 1.92                               #
  5. # Copyright 1995-2002 Matt Wright mattw@scriptarchive.com                    #
  6. # Created 06/09/95                Last Modified 04/21/02                     #
  7. # Matt's Script Archive, Inc.:    http://www.scriptarchive.com/              #
  8. ##############################################################################
  9. # COPYRIGHT NOTICE                                                           #
  10. # Copyright 1995-2002 Matthew M. Wright  All Rights Reserved.                #
  11. #                                                                            #
  12. # FormMail may be used and modified free of charge by anyone so long as this #
  13. # copyright notice and the comments above remain intact.  By using this      #
  14. # code you agree to indemnify Matthew M. Wright from any liability that      #
  15. # might arise from its use.                                                  #
  16. #                                                                            #
  17. # Selling the code for this program without prior written consent is         #
  18. # expressly forbidden.  In other words, please ask first before you try and  #
  19. # make money off of my program.                                              #
  20. #                                                                            #
  21. # Obtain permission before redistributing this software over the Internet or #
  22. # in any other medium. In all cases copyright and header must remain intact. #
  23. ##############################################################################
  24. # ACCESS CONTROL FIX: Peter D. Thompson Yezek                                #
  25. #                     http://www.securityfocus.com/archive/1/62033           #
  26. ##############################################################################
  27. # Define Variables                                                           #
  28. #      Detailed Information Found In README File.                            #
  29.  
  30. # $mailprog defines the location of your sendmail program on your unix       #
  31. # system. The flags -i and -t should be passed to sendmail in order to       #
  32. # have it ignore single dots on a line and to read message for recipients    #
  33.  
  34. $mailprog = '/usr/lib/sendmail -i -t';
  35.  
  36. # @referers allows forms to be located only on servers which are defined     #
  37. # in this field.  This security fix from the last version which allowed      #
  38. # anyone on any server to use your FormMail script on their web site.        #
  39. #
  40. #@referers = ('scriptarchive.com','209.196.21.3');
  41. #
  42. @referers = qw('mywebsite.co.uk','www.mywebsite.co.uk', localhost);
  43.  
  44. # @recipients defines the e-mail addresses or domain names that e-mail can   #
  45. # be sent to.  This must be filled in correctly to prevent SPAM and allow    #
  46. # valid addresses to receive e-mail.  Read the documentation to find out how #
  47. # this variable works!!!  It is EXTREMELY IMPORTANT. 
  48.                         #
  49. @recipients = qw('myname@myhost.co.uk', localhost);
  50.  
  51. # ACCESS CONTROL FIX: Peter D. Thompson Yezek                                #
  52. # @valid_ENV allows the sysadmin to define what environment variables can    #
  53. # be reported via the env_report directive.  This was implemented to fix     #
  54. # the problem reported at http://www.securityfocus.com/bid/1187              #
  55.  
  56. @valid_ENV = ('REMOTE_HOST','REMOTE_ADDR','REMOTE_USER','HTTP_USER_AGENT');
  57.  
  58. # Done                                                                       #
  59. ##############################################################################
  60.  
  61.  
Oct 13 '07 #5
eWish
971 Recognized Expert Contributor
I have done what you are trying to do before. It has been some time ago though.

I used the script below to do this for my brother's site. He did not want to use perl for what ever reason, so we did it in PHP. Nonetheless, here is what I used. If nothing else it will be a good start.


External scripct called contact.php I directed the flash file to look for the external file.

Expand|Select|Wrap|Line Numbers
  1. <?php
  2.  
  3.         $your_name = $_GET ['name'];
  4.     $your_email = $_GET ['email'];
  5.     $your_phone = $_GET ['phone'];
  6.     $your_fax =  $_GET ['fax']; 
  7.         $your_message =  $_GET ['comments'];
  8.  
  9.         $recipient_email = "enter_the_email_address_here_where_you_want_it_sent"; 
  10.  
  11.         $subject = "from" .$your_email;
  12.         $headers = "From:" .$your_name . "<" . $your_email .">\n";
  13.         $headers .= 'content-type: text/html; charset=iso-8859-1';
  14.  
  15.  
  16.         $content = "<html><head><title>Enter Your Site Title Here</title></head><body><br>";
  17.         $content .= "Name: <b>" . $your_name . "</b><br>";
  18.         $content .= "Phone: <b>" . $your_phone . "</b><br>";
  19.         $content .= "E-mail: <b>" . $your_email . "</b><br><hr><br>";
  20.         $content .= $your_message;
  21.         $content .= "<br></body></html>";
  22.  
  23.         mail($recipient_email,$subject,$content,$headers);
  24. ?>                         
  25.  
  26. <html>
  27.  
  28.      <body bgcolor="ffffff">
  29.  
  30.        <div align="center" style="margin-top:60px;color:#000000;font-size:11px;font-family:tahoma;font-weight:bold">
  31.             Your message was sent. Thank you!
  32.  
  33.            </div>
  34.  
  35.          </body>
  36.  
  37.       </html>
  38. <script> resizeTo (300, 300) </script>
Once it was submitted then a popup window 300 x 300 displayed a simple message. Then the flash redirected to the home page. Hopefully something like this will work for you.

I don't know php, so I can not say that there are not some security issues. I do know that he has not had any problems, and it has been about a year now.

If you want to do this in perl the look into use a module like Mail:Sendmail (which is really basic and user friendly. It is bound to be better than what the Matt's script is offering you.

Good Luck!

Note:: Jeff please don't shoot me for posting PHP code:) Thanks!
Oct 13 '07 #6
numberwhun
3,509 Recognized Expert Moderator Specialist
I have done what you are trying to do before. It has been some time ago though.

I used the script below to do this for my brother's site. He did not want to use perl for what ever reason, so we did it in PHP. Nonetheless, here is what I used. If nothing else it will be a good start.


External scripct called contact.php I directed the flash file to look for the external file.

Expand|Select|Wrap|Line Numbers
  1. <?php
  2.  
  3.         $your_name = $_GET ['name'];
  4.     $your_email = $_GET ['email'];
  5.     $your_phone = $_GET ['phone'];
  6.     $your_fax =  $_GET ['fax']; 
  7.         $your_message =  $_GET ['comments'];
  8.  
  9.         $recipient_email = "enter_the_email_address_here_where_you_want_it_sent"; 
  10.  
  11.         $subject = "from" .$your_email;
  12.         $headers = "From:" .$your_name . "<" . $your_email .">\n";
  13.         $headers .= 'content-type: text/html; charset=iso-8859-1';
  14.  
  15.  
  16.         $content = "<html><head><title>Enter Your Site Title Here</title></head><body><br>";
  17.         $content .= "Name: <b>" . $your_name . "</b><br>";
  18.         $content .= "Phone: <b>" . $your_phone . "</b><br>";
  19.         $content .= "E-mail: <b>" . $your_email . "</b><br><hr><br>";
  20.         $content .= $your_message;
  21.         $content .= "<br></body></html>";
  22.  
  23.         mail($recipient_email,$subject,$content,$headers);
  24. ?>                         
  25.  
  26. <html>
  27.  
  28.      <body bgcolor="ffffff">
  29.  
  30.        <div align="center" style="margin-top:60px;color:#000000;font-size:11px;font-family:tahoma;font-weight:bold">
  31.             Your message was sent. Thank you!
  32.  
  33.            </div>
  34.  
  35.          </body>
  36.  
  37.       </html>
  38. <script> resizeTo (300, 300) </script>
Once it was submitted then a popup window 300 x 300 displayed a simple message. Then the flash redirected to the home page. Hopefully something like this will work for you.

I don't know php, so I can not say that there are not some security issues. I do know that he has not had any problems, and it has been about a year now.

If you want to do this in perl the look into use a module like Mail:Sendmail (which is really basic and user friendly. It is bound to be better than what the Matt's script is offering you.

Good Luck!

Note:: Jeff please don't shoot me for posting PHP code:) Thanks!
Shoot you? Nah, you gave an objective solution. Whether or not I should move this to the PHP forum if he has questions about it? That is another story. ;-)
Oct 14 '07 #7
KevinADC
4,059 Recognized Expert Specialist
I've got a 30-06 round with eWish written on it. POW!!
Oct 14 '07 #8
DMcN
9 New Member
Hi, thanks again to all for the speedy reply.

I'm going to have to try and digest your info because it's new to me but thanks for taking the time to provide a possible solution.

Cheers.

D.
Oct 14 '07 #9
numberwhun
3,509 Recognized Expert Moderator Specialist
I've got a 30-06 round with eWish written on it. POW!!
Well, considering the OP's last post, I am sticking to my.....er.....g uns (yeah, that's it), that if he has questions on our newest PHP experts solution (he he, had to eWish), that I can move this to the PHP forum. :)

Regards,

Jeff
Oct 14 '07 #10

Sign in to post your reply or Sign up for a free account.

Similar topics

6
3006
by: Mica Cooper | last post by:
Hi, I have a series of Select menus on a page. I am trying to allow the user to click on the Select title and have it popup a help window. This works fine with the following code except that all the Select choices are lost. <A HREF="javascript:location='menu.jsp';window.open('menuhelp.jsp?menuID=5','me nuhelp',)">MenuTitle</A> I saw an example of a popup on a website that did not lose the menu choices.
7
4272
by: | last post by:
Hello, I would like to do the following from a asp.net button click: <form method="POST" action="https://www.1234.com/trans_center/gateway/direct.cgi"> <input type="hidden" name="Merchant" value="Merchant Name"> <input type="hidden" name="OrderID" value="Unique OrderID value"> <input type="hidden" name="email" value="Customers email address (OPTIONAL)">
6
1894
by: JACK GUNAWAN via AccessMonster.com | last post by:
Hi, I have trouble setting up an access database on a wan because I am using dial up which charges per minute. How can I get the database to be sharred across miles with much stability and lower cost. I have read all the wan posting but still does not apply to my situation. Is using a thin server/ terminal service means that I need to connect to the main server all the time? Is using the indirect replication manager applicable to me with...
11
5391
by: karen987 | last post by:
I have a web page which used to work fine until i added a rich text editor. the pages are in ASP and it is a news weblog, with a comments section where people click the headline of a comment and it opens into a pop up page ccalled "comment_view.asp" which has a reply button. If anyone wants to reply to the message, they click reply and it takes them to the parent page (view.asp) where there is a form for them to fill in,and submit the...
0
9961
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9800
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
11185
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10778
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10887
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10439
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9597
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
7148
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
2
4247
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.