Contact Us Form Question

Discussion in 'HTML & Website Design' started by primeryder, Sep 28, 2006.

  1. #1
    I am looking for any good script, preferably free for a contact form on my site
    to allow users to fill out an add url form and contact me, then be redirected
    to a page.It would be for the site http://www.julek.org which is on hostgator. I tried their own form but could not get it to redirect properly. I can cut and paste html code onto the site and that is about the extent of my skills in this area, so it would need to be simple. Thanks.
     
    primeryder, Sep 28, 2006 IP
  2. mstwntd

    mstwntd Peon

    Messages:
    72
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Hi,

    
    
    <form method="post" action="linktotheformscript.php">
    
    
    </form>
    
    Code (markup):
    
    <?php
    
    $MailToAddress = "name@domainname.com"; // your email address
    $redirectURL = "thankyou.html"; // the URL of the thank you page.
    
    # optional settings
    $MailSubject = "[Message from the Contact Page]"; // the subject of the message you will receive
    $MailToCC = ""; // CC (carbon copy) also send the email to this address (leave empty if you don't use it)
    $Message = "";
        if (!is_array($HTTP_POST_VARS))
        return;
    reset($HTTP_POST_VARS);
    	while(list($key, $val) = each($HTTP_POST_VARS)) {
    		$GLOBALS[$key] = $val;
    		if (is_array($val)) { 
    			$Message .= "<b>$key:</b> ";
    			foreach ($val as $vala) { 
    				$vala =stripslashes($vala);
    				$Message .= "$vala, ";
    			} 
    			$Message .= "<br>";
    		} 	
    		else {
    			$val = stripslashes($val);
    			if (($key == "Submit") || ($key == "submit")) { } 	
    			else { 	if ($val == "") { $Message .= "$key: - <br>"; }
    					else { $Message .= "<b>$key:</b> $val<br>"; }
    			}
    		}
    	} // end while
    $Message = "<font face=verdana size=2>".$Message;
    mail( $MailToAddress, $MailSubject, $Message, "Content-Type: text/html; charset=ISO-8859-1\r\nFrom: ".$email."\r\nBCc: ".$MailToCC);
    header("Location: ".$redirectURL);
    ?>
    
    Code (markup):
    And please, cut it out with the 'simple'. Nothing is ever simple.
     
    mstwntd, Sep 28, 2006 IP
  3. primeryder

    primeryder Well-Known Member

    Messages:
    1,658
    Likes Received:
    40
    Best Answers:
    0
    Trophy Points:
    158
    #3
    Thank you very much for the timely reply. BTW would this code work on a regular html page such as addurl.html or would it only work on a php database site? Thanks again!
     
    primeryder, Sep 28, 2006 IP
  4. Colbyt

    Colbyt Notable Member

    Messages:
    3,224
    Likes Received:
    185
    Best Answers:
    0
    Trophy Points:
    210
    #4
    For a good php version with image verification try themike dot com.

    I am using it on a couple of site and it works really well.
     
    Colbyt, Sep 28, 2006 IP
  5. ibnuasad

    ibnuasad Notable Member

    Messages:
    1,045
    Likes Received:
    132
    Best Answers:
    0
    Trophy Points:
    275
  6. primeryder

    primeryder Well-Known Member

    Messages:
    1,658
    Likes Received:
    40
    Best Answers:
    0
    Trophy Points:
    158
    #6
    Does anyone know of a similiar scrip that works on a regular html page? I am not very well versed in php. Thanks
     
    primeryder, Oct 2, 2006 IP
  7. knightyme

    knightyme Peon

    Messages:
    59
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #7
    Yes, it's a form script that is not only simple to install, it can be used in basic HTML or PHP pages. It also comes with 'autoreply' so that your visitor knows you received their message.

    The script is free and can be found at.....

    http://www.bignosebird.com
     
    knightyme, Oct 2, 2006 IP
  8. primeryder

    primeryder Well-Known Member

    Messages:
    1,658
    Likes Received:
    40
    Best Answers:
    0
    Trophy Points:
    158
    #8
    Wow, thanks Knightyme!
     
    primeryder, Oct 5, 2006 IP