28 users online (1 members and 27 guests)  


  Results 1 to 4 of 4

Related

  1. Replies: 3
  2. Creating a form with file submission    Forum: Website Scripts Forum
    Replies: 1
  3. Replies: 3
  4. form submission    Forum: Website Scripts Forum
    Replies: 2
  1. #1
    maj's Avatar
    New User

    Status
    Offline
    Join Date
    May 2003
    Location
    Indiana, US
    Posts
    2

    Exclamation need help with creating a online submission form

    Hi. I'm trying to create an online submission page, much like the user registration page here. I know how to do the text boxes and buttons, but I have no idea how to code it so that the user hits the submit button, it sends the information they input to my email account. Any help would be greatly appreciated.

    page i'm working on (for reference)
    http://www.chattitudes.net/submit.html
    Thanks!

    -William
    Last edited by maj; 05-17-2003 at 08:22 PM.

  2. #2
    benzden's Avatar
    Senior Member

    Status
    Offline
    Join Date
    Feb 2002
    Location
    San Antonio, Texas
    Posts
    652
    That URL doesn't work. There are a couple ways to do it.

    One, with a .cgi or other process provided by your web host that sends it to the default email address you have set up with them and depends upon the FORM they provide.

    The other is less secure and sends it to wherever you want and uses the

    <FORM ACTION="mailto:myname@mydomain.com?subject=feedback" ENCTYPE="text/plain" METHOD="post">


    Note that the latter opens the page upon its used to spambots who will pick up the email address indicated (via the mailto: and @) and add it to thousands of junk mail lists. Use your imagination to encrypt the mailto: and @ portions.

  3. #3
    maj's Avatar
    New User

    Status
    Offline
    Join Date
    May 2003
    Location
    Indiana, US
    Posts
    2

    php

    Oops, sorry, i fixed the url. I was trying to use a mailer.php that i found on this site, but i couldn't seem to get it to work. I wanted it to be so that it the server sends the email, instead of making the user's mailer open. I used the mailer.php that i had found that QuietDean had written for somebody else, but it just doesn't seem to do anything.

    script i'm using:

    <php?
    /? Filename: mailer.php

    // Generic Emailer

    // Default Settings

    $recipient = "majesty_apathy@chattitudes.net";

    $redirect = "My_thank_you_page.html";



    // First, detects whether info is received via form -



    $subject = "Email From my Website";

    $from = "From: My Website Emailer";

    $email = "
    ";

    $data = $HTTP_POST_VARS;

    foreach($data as $k => $v) {

    $k = stripcslashes($k);
    $v = stripcslashes($v);

    $email .= "\n$k : $v";



    }


    mail($recipient, $subject, $email, $from);

    header("Location: $redirect");



    ?>
    Last edited by maj; 05-17-2003 at 09:48 PM.

  4. #4
    QuietDean's Avatar
    Administrator

    Status
    Offline
    Join Date
    Oct 2000
    Location
    Bournemouth, UK
    Posts
    2,662
    Try changing

    Code:
    <php?
    tp

    Code:
    <?php
    Only other thing to watch is that your form method HAS to be post, eg

    Code:
    <form action="mailer.php" method="post">
    If one of our members helps you, please click the icon to add to their reputation!
    No support via email or private message - use the forums!
    Before you ask, have you Searched?



Tags for this Thread