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.
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.
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!
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.
Does anyone know of a similiar scrip that works on a regular html page? I am not very well versed in php. Thanks
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