Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Page 1 of 2 1 2 LastLast
Results 1 to 10 of 12
  1. #1
    Junior Member
    Join Date
    Jan 2004
    Posts
    5
    Member #
    4407
    I am trying to make a questionnaire that I want to send to people that they can fill out in their email applications and then submit. I know what your going to say ' but what about pop email accounts and such?' I will only be sending this form to people who have online email accounts such as hotmail, yahoo, aol etc. Now the problem I have is this:

    I have gotten hold of a small peice of code that when opened in a browser actually emails the results of the form to my required email address, however, when I test it in my own hotmail account, nothing is then emailed.

    Here is the code:


    <FORM action=http://mailgate.server-mail.com/cgi-bin/mailgate method=post><INPUT
    type=hidden value=MYEMAILADDRESS@ME.COM name=recipient> <INPUT type=hidden
    value=WHEREVERIWANTTHEMFORWARDEDONTO.COM><INPUT type=hidden value=1 name=error_count>
    <form name="form1" method="post" action="">


    I am more or less a total noob when it comes to things like this, if I am going completely the wrong way about it, please post the easiest alternative, thanks for any help!

    Geek.

  2.  

  3. #2
    Senior Member justlivyalife's Avatar
    Join Date
    Jul 2003
    Location
    Birmingham, UK
    Posts
    2,871
    Member #
    2374
    Does your host support PHP? If so your best option is to use a formmail script which is built into a webpage?

    I can't see how what you want to do can be done without using something such as PHP/ASP.
    justlivyalife - The future depends on what we do in the present. (Mahatma Gandhi)
    WDF Resources: WDF Rules
    Non-WDF: JavascriptSource | Dynamic Drive | phpBB | HTML-Kit | Winamp | Download Firefox | Morguefile

  4. #3
    Junior Member
    Join Date
    Jan 2004
    Posts
    5
    Member #
    4407
    really? is PHP hard to learn? Would I just need to use a small PHP script somewhere in the html or is it something different altogether?

  5. #4
    Senior Member teal's Avatar
    Join Date
    Dec 2003
    Posts
    247
    Member #
    4319
    Yea, PHP is very hard to learn, (I am trying valiantly, and failing so far) it being a fully functional programming language, but getting the code you need shouldn’t be so hard. Try snooping around for what you need at http://px.sklar.com/ or searching for it online.

    By the way, I am on the search for a good (preferably free) method for learning PHP, so if anyone has a good tutorial or such online, I would appriciate it.
    Whoth steps forth to mock the teal? Whom couldst say a color superior!

    Proclamith me, it cannot be done.

  6. #5
    Senior Member justlivyalife's Avatar
    Join Date
    Jul 2003
    Location
    Birmingham, UK
    Posts
    2,871
    Member #
    2374
    There are a few PHP resources and Scripts located in this thread, which is listed at the top of the PHP/MySQL forum.
    justlivyalife - The future depends on what we do in the present. (Mahatma Gandhi)
    WDF Resources: WDF Rules
    Non-WDF: JavascriptSource | Dynamic Drive | phpBB | HTML-Kit | Winamp | Download Firefox | Morguefile

  7. #6
    Junior Member
    Join Date
    Jan 2004
    Posts
    5
    Member #
    4407
    Here is the test code I am using:

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
    <title>Untitled Document</title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    </head>

    <body>
    <FORM action=http://mailgate.server-mail.com/cgi-bin/mailgate method=post><INPUT
    type=hidden value=geekusdeekus@hotmail.com name=recipient> <INPUT type=hidden
    value=www.hotmail.com ><INPUT type=hidden value=1 name=error_count>
    <form name="form1" method="post" action="">
    <p>
    <input type="text" name="textfield">
    </p>
    <p>
    <input type="submit" name="Submit" value="Submit">
    </p>
    </form>
    </body>
    </html>

    It works fine when on a web page but when I send it to my hotmail account it shows this as well as the text field and submit button:

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">

    value=www.hotmail.com >

    When I fill it out and ubmit it, nothing is emailed. Also when its submitted it doesn't redirect to hotmail as I told it to. There probably a million things wrong with this code but does the link it gave me give any clues as to what I'm doing wrong?

  8. #7
    Senior Member dotcommakers's Avatar
    Join Date
    Oct 2003
    Posts
    527
    Member #
    3342
    Liked
    1 times
    sample code is working

    Well this code is working fine

    Code:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
    <title>Untitled Document</title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    </head>
    
    <body>
    <FORM action=http://mailgate.server-mail.com/cgi-bin/mailgate method=post><INPUT
    type=hidden value=geekusdeekus@hotmail.com name=recipient> <INPUT type=hidden
    value=www.hotmail.com ><INPUT type=hidden value=1 name=error_count>
    <form name="form1" method="post" action="">
    <p>
    <input type="text" name="textfield">
    </p>
    <p>
    <input type="submit" name="Submit" value="Submit">
    </p>
    </form>
    </body>
    </html>
    can u explain me what's problem

    Here is a php form i made for you hope you found it usefull you can add more fields there

    : HTML :

    Code:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
    <title>Simple PHP Form</title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    </head>
    
    <body>
    <table width="100%" border="0" cellspacing="10" cellpadding="0">
      <tr> 
        <td height="25" bgcolor="#FFCC00">
    <strong><font size="2" face="Arial, Helvetica, sans-serif">
    Sample PHP Form</font></strong></td>
      </tr>
      <tr> 
        <td>
    	<form name="form1" method="post" action="contact.php">
    <table width="100%" border="0" cellspacing="1" cellpadding="0">
              
    <tr> 
    <td width="19%"><font size="2" face="Arial, Helvetica, sans-serif">
    <strong>Name:</strong></font></td>
     <td width="81%"> <input name="name" type="text" id="name"> 
    </td>
    </tr>
    <tr> <td>&nbsp;</td>
    <td>
    <input type="submit" name="Submit" value="Submit">
    </td>          </tr>        </table>
    </form></td>
     </tr>
     <tr>
       <td>&nbsp;</td>
     </tr>
    </table>
    </body>
    </html>
    : PHP SCRIPT :

    Code:
    <?
    $rname=$HTTP_POST_VARS['name'];
    
    $mail_to="Youremail@domain.com";
    $mail_from="$rname <$rname>";
    $mail_headers="from:$mail_from\nContent-Type: text/html; charset=iso-8859-1";
    $mail_subject="An enquiry from $rname";
    $msg="$rname";
    $mail_body=$msg;
    if (mail($mail_to,$mail_subject,$mail_body,$mail_headers))
    {
     echo	"<meta http-equiv=refresh content=\"0;url=index.htm\">";
     }
     else
     {
    	echo('Error in mail server please check');
     }
     }
    
    ?>
    thanks

  9. #8
    Senior Member dotcommakers's Avatar
    Join Date
    Oct 2003
    Posts
    527
    Member #
    3342
    Liked
    1 times
    rename html page

    rename html page to "index.htm"

    thanks just forgot :classic:

  10. #9
    Junior Member
    Join Date
    Jan 2004
    Posts
    5
    Member #
    4407
    Thank you very much for the time you have taken, I have just 2 questions.

    Firstly, you said rename it to 'index.htm' I presume this is so it can be hosted, my problem is that I don't want it hosted, I need to email this form to people so they can fill it out in their online emial ( ie hotmail or whatever) and then submit it and it mails to me.

    Secondly, thanks for the PHP script, how do I actually implement this into the form to make it work, and again, can I actually make it part of the email that will work in peoples online emails?

    Thank you very much for taking the time to reply to me.

  11. #10
    Senior Member dotcommakers's Avatar
    Join Date
    Oct 2003
    Posts
    527
    Member #
    3342
    Liked
    1 times
    k here is solution

    k here is solution plz check attached pages...

    as php is not working in local pc you must upload this pages anywhere where php support is available.

    as you will fill the html form it will send same html form page to that user and they can able to send emails.

    check php page and put there your email address

    let me know

    thanks


Page 1 of 2 1 2 LastLast

Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

Search tags for this page

register mailgate cgi-bin

Click on a term to search for related topics.
All times are GMT -6. The time now is 12:02 AM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com