Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 10 of 10

Thread: Submission Form

  1. #1
    Regular Coder
    Join Date
    Jul 2007
    Location
    USA
    Posts
    146
    Thanks
    5
    Thanked 3 Times in 2 Posts

    Submission Form

    I need to make a form where it requires all information to be filled in. I can write up all the questions needed, but I just need to get the boxes where it's entered and figure out a few other things. I need to know the html/css codes for it, and I also need to find out how to access the information once it's filled out. Is there a way I can get it emailed to me once they fill it out? Does it go to my hosting company for me to check out? Please inform me and help me find a site or code that will work for me. Thanks guys.
    Quote Originally Posted by rmedek View Post
    Doctordew, as soon as they come out with the opposite of an infraction, I am going to give you a million of them. You are my new favorite person on the forum.

  • #2
    The fat guy next door VIPStephan's Avatar
    Join Date
    Jan 2006
    Location
    Halle (Saale), Germany
    Posts
    8,677
    Thanks
    6
    Thanked 1,008 Times in 981 Posts
    For a form to be processed you need a server side script like ASP, PHP, or the like. The plain HTML for it is relatively simple. Just search for “form HTML” or something like that. Google is your friend. Or actually, this is a nice article: http://www.alistapart.com/articles/p...ccessibleforms

    There are also free form mailer scripts (the server side scripts that are processing the form input) of which you will find hundreds if you’d just do a search.

  • #3
    Regular Coder
    Join Date
    Jul 2007
    Location
    USA
    Posts
    146
    Thanks
    5
    Thanked 3 Times in 2 Posts
    That site seems to be exactly what I needed. That's why I ask these questions. Although I try googling I don't always find the quality content that I'm looking for, and members here may have some good experience with a certain site/tutorial. Good article. +rep!
    Quote Originally Posted by rmedek View Post
    Doctordew, as soon as they come out with the opposite of an infraction, I am going to give you a million of them. You are my new favorite person on the forum.

  • #4
    Regular Coder Jutlander's Avatar
    Join Date
    Jun 2007
    Location
    In my own sick little world :P
    Posts
    425
    Thanks
    1
    Thanked 12 Times in 12 Posts
    I use this PHP script for mailforms (placed in a file called mailform.php):

    PHP Code:
    <?php
    if (isset($_POST['submit']))
    {
     if (!empty(
    $_POST['name']) &&
     !empty(
    $_POST['email']) &&
     !empty(
    $_POST['subject']) &&
     !empty(
    $_POST['message']) &&

     !
    strpos($_POST['name'], "your-domain.com") &&
     !
    strpos($_POST['email'], "your-domain.com") &&
     !
    strpos($_POST['name'], "@") &&
     !
    eregi("\r",$_POST['name']) &&
     !
    eregi("\n",$_POST['name']) &&
     !
    eregi("\r",$_POST['email']) &&
     !
    eregi("\n",$_POST['email']))

     {
      
    $headers="From: ".$_POST['name']."<".$_POST['email'].">";
      if (@
    $_POST['customer_copy'])
      {
       
    $headers .= "\r\nBcc: ".$_POST['email'];
      }
      if (@
    mail("your-email-address@mail.com"strip_tags($_POST['subject']),
      
    stripslashes(strip_tags($_POST['message'])), $headers))
      {
       echo 
    "<p>Thanks for your mail!</p>";
      }
      else
      {
       echo 
    "<p>The e-mail was not sent! Please try again.</p>";
      }
     }
     else
     {
      echo 
    "<p>The e-mail could not be sent. All fields must be filled out.</p>";
     }
    }
    ?>
    and

    Code:
    <form method="post" action="mailform.php">
    
    <div><label>Navn:</label><br>
    <input id="t1" type="text" name="name"><br><br>
    
    <label>Email:</label><br>
    <input id="t2" type="text" name="email"><br><br>
    
    <label>Emne:</label><br>
    <input id="t3" type="text" name="subject"><br><br>
    
    <label>Besked:</label><br>
    <textarea id="t4" name="message" rows="10" cols="49"></textarea><br>
    
    <label>If checked, a copy will be sent to your inbox</label>
    <input type="checkbox" id="t5" name="customer_copy" checked="checked"><br><br>
    
    <input id="t6" type="submit" name="submit" value="Send e-mail"></div>
    
    </form>
    The good thing about it is that you give the user the option to send a copy to his inbox. The other good thing, well... it can send mails.
    .
    .

  • #5
    Regular Coder
    Join Date
    Jul 2007
    Location
    USA
    Posts
    146
    Thanks
    5
    Thanked 3 Times in 2 Posts
    Thanks alot jutlander! I have a question though. If I wanted to add an extra question how would I do that?

    My guess from looking at the code is this

    Code:
     !eregi("\r",$_POST['NEW QUESTION HERE']) &&
    That looks to be correct to me, but I'm not sure. Also would I have to add something to the bottom part?


    +rep!!!
    Quote Originally Posted by rmedek View Post
    Doctordew, as soon as they come out with the opposite of an infraction, I am going to give you a million of them. You are my new favorite person on the forum.

  • #6
    Regular Coder Jutlander's Avatar
    Join Date
    Jun 2007
    Location
    In my own sick little world :P
    Posts
    425
    Thanks
    1
    Thanked 12 Times in 12 Posts
    Will try to figure out how to do that, just need a few more hours sleep, got too late yesterday..
    .
    .

  • #7
    Senior Coder koyama's Avatar
    Join Date
    Dec 2006
    Location
    Copenhagen, Denmark
    Posts
    1,246
    Thanks
    1
    Thanked 5 Times in 5 Posts
    Quote Originally Posted by Jutlander View Post
    The good thing about it is that you give the user the option to send a copy to his inbox.
    One may argue that this is actually a weakness of the form. I think spammers will love this form.

  • #8
    Regular Coder
    Join Date
    Jul 2007
    Location
    USA
    Posts
    146
    Thanks
    5
    Thanked 3 Times in 2 Posts
    His as in his own email address? I'm not so sure what you mean by spammers. I'm fine with the amount of emails I'll be getting.
    Quote Originally Posted by rmedek View Post
    Doctordew, as soon as they come out with the opposite of an infraction, I am going to give you a million of them. You are my new favorite person on the forum.

  • #9
    Regular Coder Jutlander's Avatar
    Join Date
    Jun 2007
    Location
    In my own sick little world :P
    Posts
    425
    Thanks
    1
    Thanked 12 Times in 12 Posts
    I think he means that spammers can make good use of this form, because they can write in another e-mail address and in that way, send spam to both you and the other e-mail. I like to keep a copy of the mails I send though...
    .
    .

  • #10
    Regular Coder
    Join Date
    Jul 2007
    Location
    USA
    Posts
    146
    Thanks
    5
    Thanked 3 Times in 2 Posts
    Oh, well I don't really mind. If it gets to bad I could change it, but I don't think I'll be getting to many spam type sign ups, I hope.

    Anyways about adding another question...?
    Quote Originally Posted by rmedek View Post
    Doctordew, as soon as they come out with the opposite of an infraction, I am going to give you a million of them. You are my new favorite person on the forum.


  •  

    Posting Permissions

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