1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

A contact form that doesn't use an e-mail client

Discussion in 'HTML & Website Design' started by tayiper, Oct 8, 2007.

  1. #1
    Hey all, can somebody please suggest me a contact form that doesn't require an e-mail client, meaning the one that compare to the one that I currently use doesn't simply launch an e-mail client/program, but processes the request "by itself". I actually don't need it for myself, but for my friend's girlfriend who just coded here website/portal.


    Now, I already searched the web with Google (IIRC I searched for "free contact form", "free contact form doesn't need e-mail client", "free contact form that doesn't use e-mail client" etc. combinations), but found out that unfortunately most of them require a .dll file etc. (and of course, these aren't free), so I guess this thing is not as easy to implement as it seems on the first look.


    Oh well, I did in fact find one that was built with Pearl (at least I guess so), i.e. you simply downloaded a .zip package, edited the "contact.pl" file (IIRC it was named so), and then upload the modified file into the "cgi-bin" directory on the server. However, she says she did that but it doesn't work.


    P.S. - By the way: is it so that most of today's hosting providers' (i.e. providers of webspace) packaged support Pearl, right??!
    SEMrush

    tayiper
     
    tayiper, Oct 8, 2007 IP
    SEMrush
  2. AstarothSolutions

    AstarothSolutions Peon

    Messages:
    2,681
    Likes Received:
    77
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Perl is considered out of date being replaced by PHP or indirectly with ASP (which in itself has been replaced by .Net)

    I am a little suspicious of your comment that she has "coded" her own portal - if she has the programming abilities to write a portal then sending an email is exceptionally simple in comparison.

    First thing you need to do is check what her web host supports in terms of PHP/ ASP/ .Net and then search for a script in that language/ framework - ASP was a pain for sending emails as it didnt have built in components to do it and many basic webhosts disabled IIS's component.
     
    AstarothSolutions, Oct 9, 2007 IP
    tayiper likes this.
  3. tayiper

    tayiper Active Member

    Messages:
    421
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    78
    #3
    Well you know, she did it in/with FrontPage program, and so you can guess that she doesn't have a clue about "actual coding", not to mention web-standards and so on ...


    tayiper
     
    tayiper, Oct 11, 2007 IP
  4. CavemanJoe

    CavemanJoe Peon

    Messages:
    15
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Run a Google search on "Matt's Script Archives" and "Formmail." If you want a hand setting it up, drop me a PM. :D
     
    CavemanJoe, Oct 11, 2007 IP
  5. le_gber

    le_gber Peon

    Messages:
    28
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #5
    What you are after is a 'form to email script'. Try google for 'form to email script' or formmail or nms_formmail.

    They are usually simple to install and configure.
     
    le_gber, Oct 11, 2007 IP
    tayiper likes this.
  6. Dan Schulz

    Dan Schulz Peon

    Messages:
    6,032
    Likes Received:
    434
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Dan Schulz, Oct 11, 2007 IP
  7. tayiper

    tayiper Active Member

    Messages:
    421
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    78
    #7
    Hey, thank you both (i.e. le_gber and Dan Schulz) for your very helpful/informative replies!!


    tayiper
     
    tayiper, Oct 12, 2007 IP
  8. tayiper

    tayiper Active Member

    Messages:
    421
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    78
    #8
    Oh and le_gber, that query (i.e. "form to email script") is precisely what I needed. Namely, with it I found these: Form To Email PHP form processor script two: PHP Email - PHP Email Form - PHP Email Script sites; I guess I will use the one from about.com since the code seems very straight-forward to me ...


    tayiper
     
    tayiper, Oct 12, 2007 IP
  9. tayiper

    tayiper Active Member

    Messages:
    421
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    78
    #9
    /EDIT: Well, I just tested it, but unfortunately (and surprisingly) same as it did on my computer (which is not server and doesn't "support" PHP), it just opened a "contact.php" file and displayed the text/code that's in it instead of continuing with the processing of request ...


    The files in question are the following http://tadejpersic.50webs.com/contact-test.html two files http://tadejpersic.50webs.com/contact.php


    P.S. - And yes, I doubt that the "50webs.com" free-host doesn't support PHP.


    tayiper
     
    tayiper, Oct 12, 2007 IP
  10. Mike H.

    Mike H. Peon

    Messages:
    219
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    0
    #10
    tayiper:

    Your host does support PHP.

    I think that you are not saving the code as an actual .php file. I think that you have never previously created a .php file.

    You must open Control Panel | Folder Options, and create a new file type: php
    You can assign Notepad as the editor.

    Then, copy the code below, edit the "to" email address, save it as a .php file, create a "thankyou.html" document, upload the files, and test them.
    
    <?php 
    	
    	if (isset($_POST['submit']))
    		{
    		 $to = "me@localhost";  // change this to the recipient's email address
    		 $headers = "From: Site Visitor\n";  
    		 $headers .= "Content-Type: text/plain; charset=iso-8859-1\n";
    		 $subj = "Inquiry";
    		 $details = "Name: ".$_POST['contact']."\n";
    		 $details .= "Email: ".$_POST['email']."\n";
    		 $details .= "Message:\n".$_POST['message'];
    		 mail($to, $subj, $details, $headers);
    		 header("Location: thankyou.html");   // create a thankyou.html page in the same folder
    		 exit;
    		}
    ?>
    
    <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
       "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
    <title>Inquiry Form</title>
    <script type="text/javascript">
    	
    	function validate(nForm){
    
    		for (i=0; i<3; i++)
    			{if (nForm[i].value == ""){alert('Please complete all fields');return false}}
    	}
    
    </script>
    <style type="text/css">
    
    	form {width:300px;margin:auto;padding-top:30px}
    	fieldset {padding:5px;background-color:#f0fff0;border:1px solid #87ceeb}
    	legend {font-size:14pt;color:#00008b;background-color:#87ceeb;padding-left:3px;padding-right:3px;margin-bottom:5px;}
    	label {font-size:12pt;color:#00008B;padding:5px}
    	.submitBtn {font-family:tahoma;font-size:10pt;display:block;margin-left:auto;margin-right:auto;margin-top:5px;margin-bottom:5px}
    
    </style>
    </head>
    <body>
    	<form method="post" action="<?php echo $_SERVER['PHP_SELF']; ?>" onsubmit="return validate(this)">
    		<fieldset>
    		   <legend>Inquiry</legend>	
    			<label> Name: <input type='text' name='contact' size='30'></label>
    			<br>
    			<label>Email: &nbsp;<input type='text' name='email' size='30'></label>
    			<br>
    			<label>Message:
    			<br>
    			<textarea name='message' rows='4' cols='30' style='overflow:auto;margin-left:12px'></textarea>
    			</label>
    			<input type='submit' name="submit" value="Submit" class="submitBtn">
    		</fieldset>
    	</form>
    </body>
    </html>
    Code (markup):
     
    Mike H., Oct 12, 2007 IP
    tayiper likes this.
  11. tayiper

    tayiper Active Member

    Messages:
    421
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    78
    #11
    tayiper, Oct 12, 2007 IP
  12. tayiper

    tayiper Active Member

    Messages:
    421
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    78
    #12
    Oh sorry Mike H., I totally missed your reply (i.e. I wrote my post off-line); I will ehm, let's say "study" it and then report back!!


    tayiper
     
    tayiper, Oct 12, 2007 IP
  13. tayiper

    tayiper Active Member

    Messages:
    421
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    78
    #13
    Horray, this one seems to work (at least the processing of request part was performed OK), yeah!!! Now I am only waiting for the e-mail to hit my Inbox ...


    /UPDATE: Urghhh, no luck so far, and I sent it to three different addresses. I really don't know what's wrong. Anyway, now I will carefully read Mike H.'s post above /UPDATE: and try the code he provided ...


    tayiper
     
    tayiper, Oct 12, 2007 IP
  14. tayiper

    tayiper Active Member

    Messages:
    421
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    78
    #14
    Hmmm, but what about http://tadejpersic.50webs.com/contact.php file, isn't this a file containing the PHP code??! And isn't PHP a language that uses a common text (same as HTML, CSS etc.), so that the code should go to a common .txt file and than one should only change the extension from .txt to .php??!


    But anyway, I have a few problems understanding the code you've provided. I mean you wrote:

    However, in this code there are both, a HTML (i.e. the actual form/page with the form) and a PHP part!! As I was used to do with the previous scripts (see above), the PHP part should go into some separate/external .php file. But from the HTML code it's not obvious how it should be named.


    P.S. - And if I do as you said I should (i.e. save all the code - PHP and HTML part of it - into a .php file), it looks like this: http://tadejpersic.50webs.com/contact-test3.php


    tayiper
     
    tayiper, Oct 12, 2007 IP
  15. Mike H.

    Mike H. Peon

    Messages:
    219
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    0
    #15
    tayiper:

    Did you create a new file type in Folder Options? DID YOU?

    Please, stop questioning, stop speculating. Follow my instructions. ALL THE CODE GOES IN ONE FILE, A .PHP FILE.

    I clicked the link you provided above. A PHP file will not open as a .txt file if it is saved as a .php file.

    Please don't make me repeat myself, yet again. Follow the instructions.

    Do you know how to create an .html file for the thank you page? Do you?

    If not just put // in front of the last two lines. Like this:

    // header("Location: thankyou.html");
    // exit;
     
    Mike H., Oct 12, 2007 IP
  16. jeffersonalan

    jeffersonalan Peon

    Messages:
    98
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #16
    This form works amazing and easy, every time, first time. That matts formmail thing sucks balls a lot of messing around, it's just been around so long everyone links to it and it was linked to a million time.
    The form found here http://www.dagondesign.com/articles/secure-php-form-mailer-script
    kicks the crap out of that form plus it has built in captcha if needed can handle files and attachments simply works great.

    Heres a demo of where i have installed it http://www.exilarate.com/contact.php

    can incorporate into an existing page easily and use that pages existing css

    If you get stuck i can install it, and customize the fields for you for 10$.

    jefferson
     
    jeffersonalan, Oct 12, 2007 IP
  17. tayiper

    tayiper Active Member

    Messages:
    421
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    78
    #17
    Look man, thanks for your replies, and sorry for not following your instructions right away, but I was thinking in terms of .txt vs. .html (also see below); you see, I just said that (at least AFAIK) the PHP code is just a plain text (i.e. not binary or whatever), same as is HTML code. Because as we all know: one thing is a file-type (and its extension), and the other thing is the format in which it's written, i.e. basically .txt, .html, .css are all files with different extensions (and of course with different programs associated to open them on double-click), but they all consist of just plain text, compare to .exe, .bin etc. files ...

    And yes, this question is/was quite offensive, of couse I am not that stupid. How could I then create my own website in the first place??!


    I think the problem is also that you actually haven't read my post (at leasr carefully enough), because if you would, you would certainly understand what I wanted to say. So please read this text below carefully at least this time:

    I was simply thinking that if, as mentioned, the PHP code is just a plain text, then same as in case of HTML files/code (i.e. you just create a plain .txt file, and change its extension to become a .html file), I would only need to change the file's extension with no need to create a special file-style under Folder Options -- View. You see, I simply thought that this same "princip" applies also to PHP files, i.e. that simply changing the extension to .php (from .txt for instance) makes the respective file a PHP file.


    Anyway, now I did create a new file-type, and surely it displays a "contact form", but it does it just in Firefox ( /UPDATE: and only locally, i.e. on my PC, and not when I try it on the server: contact-test3.php), and not in IE 6 that I have installed on my computer. (i.e. in it, it still displays the code instead)


    The screenshot for you to believe me that I did as you said I should:

    [​IMG]


    P.S. - Sorry all for the delay in replying, but I was getting the "The connection has timed out" and "The connection was reset" errors all the time yesterday (well, and today too) when trying to post a reply!! /UPDATE: Well, now it finally worked without problems (i.e. without time-outs and reserts) after changing the hosts IP from 216.9.35.59 to 216.9.35.60.


    tayiper
     
    tayiper, Oct 13, 2007 IP
  18. Mike H.

    Mike H. Peon

    Messages:
    219
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    0
    #18
    See, Question 22:

    http://www.50webs.com/faq.html

    I don't know what "AFAIK" means. It must be another juvenile, and asinine abbreviation that people your age use because of laziness, like plz and thx.

    I still believe that you are not creating a .php file. You think that you are but you aren't. For example, open Notepad, type anything, then click Save As: Do NOT change the drop down list. Save the file as MyTest.php

    Hover on the icon. It will appear to be a PHP file, as shown in the left sidebar. But it isn't. It's a file named: MyTest.txt.php

    I told you to make Notepad the PHP file editor. You didn't. When saving the file using Notepad you have to change the dropdown to "All Files", then save it as MyTest.php.

    The first screen shot will produce a file named, MyTest.txt.php
    The second, will create a PHP file, so long as that file type has been previously created.

    You just refuse to follow instructions. You don't want help. All you want to do is argue with someone.

    You have yet to actually create a true .php file. You've created nothing but .txt files, and you keep forcing me to repeat myself, now, that's offensive. You've never created a .php file in your life, you've never written one line of php code, not one, yet you presume to lecture me on how it's done.

    Follow the instructions. Create an actual .php file.

    I'm finished. You can argue with, and lecture, someone else.
     

    Attached Files:

    Mike H., Oct 14, 2007 IP
  19. tayiper

    tayiper Active Member

    Messages:
    421
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    78
    #19
    OK, now after this last post of yours I KNOW FOR CERTAIN that I am right and not you ...

    I first thought that you were actually talking about file-type (or file-format), but now I see that I was right, i.e. that a .php file is just a common plain-text file with extension .php. Again, is this file maybe named "contact-test3.txt.php" or contact-test3.php??

    And as second, I don't use Explorer as my file-manager, so there's no "hidding of known file-types" (or whatever) on my computer!!


    So please, don't try to lecture me regarding file-types/extensions, because I understand all these things/terms 100% correctly!! But anyway, thanks for all your help!!!!


    tayiper
     
    tayiper, Oct 14, 2007 IP
  20. Dan Schulz

    Dan Schulz Peon

    Messages:
    6,032
    Likes Received:
    434
    Best Answers:
    0
    Trophy Points:
    0
    #20
    tayiper, what are you using for your text editor?

    (And Mike H., AFAIK means "as far as I know" - I'm 28 and even I know that.)
     
    Dan Schulz, Oct 14, 2007 IP