Results 1 to 3 of 3

Thread: Basic html contact form

  1. #1
    Join Date
    Apr 2007
    Posts
    33
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Basic html contact form

    im looking for just a basic contact for in html. It needs to be html as i stupidly created an image in photoshop which incorporated hyperlinks so now i am stuck with the contact.html for example

  2. #2
    Join Date
    Aug 2007
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    As a non-programmer i'd suggest using some php contact form generator. You can find one on http://40secscontactform.com
    It has all the essential functions, spam protection and looks good at my site.

  3. #3
    Join Date
    Jul 2006
    Location
    just north of Boston, MA
    Posts
    1,806
    Thanks
    13
    Thanked 72 Times in 72 Posts

    Default

    Quote Originally Posted by wentwooddownhill View Post
    im looking for just a basic contact for in html. It needs to be html as i stupidly created an image in photoshop which incorporated hyperlinks so now i am stuck with the contact.html for example
    if you didnt save the psd file, then yes you would need to create a new image, or just stick with the one you have...

    now as for the contact email... the processing and sending of the email does not have to be totally html. if you know how to create a form inputs then u can use the script below, and whatever you put in the form will be sanitized and added to the body of the email.

    if you do not know how to create form inputs or you do not have access to server that supports php, then you would need to use some free service processing like Smimmon suggested

    contact.html
    Code:
    <form name="form" method="post" action="process.php">
         __YOUR_INPUT__
         <input type="submit" name="submit" value="Send Email">
    </form>
    process.php
    PHP Code:
    $to _YOUR_EMAIL_;
    $subject _SUBJECT_OF_EMAIL_
    $message " ";
    [
    COLOR="Blue"]$from $_REQUEST['[B]_from_input_name_[/B]'];[/COLOR]

    foreach(
    $_REQUEST as $key => $value) {
        
    $message .= "<p><strong>" trim(strip_tags($key)) . "</strong> - " trim(strip_tags($value)) . "</p>";
    }

    if( !
    mail($to$subject$message"From: $from") ) {
         echo 
    "Send Email Failed Please Try Again Later";
    }
    else {
         echo 
    "Email Sent <a href=\"history.go(-2)\">Go Back</a> to previous page";


    update the _from_input_name_ to the name of the input you are using to grab the senders email
    eg if you are using
    Code:
    <input type="text" name="from_email" value="">
    you would replace _from_input_name_ with from_email
    Last edited by boogyman; 08-22-2007 at 04:38 PM. Reason: added ability to display "from" email

Bookmarks

Posting Permissions

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