PDA

View Full Version : contact form error


BullDog
12-14-2011, 05:02 AM
I had this working earlier today. all I've done is move it to the root directory. www.bugorama.com check out the contact page to see the parse error. I did not create the contact form so I am a bit lost as to where the error is coming from.

edbr
12-14-2011, 05:43 AM
post the code so i can see it please

BullDog
12-14-2011, 05:58 AM
contact.php
<?php
/**
* No errors in form initially
*/
require_once 'is_email.php';
$error = array(
'name' => 0,
'email' => 0,
'category' => 0,
'message' => 0
);
$errorFlag = 0;

if( isset( $_POST[ 'email' ] ) ) {
function clean_string( $string ) {
$bad = array( "content-type", "bcc:", "to:", "cc:", "href" );
return trim( str_replace( $bad, "", $string ) );
}

$category = clean_string( $_POST['category'] );
$name = clean_string( $_POST['name'] );
$email = clean_string( $_POST['email'] );
$message = clean_string( $_POST['message'] );
$phone = clean_string( $_POST['phone'] );
$subject = clean_string( $_POST['subject'] );

if( !$category ) {
$error[ 'category' ] = 1;
$errorFlag = 1;
}

if( !isset( $message ) || strlen( $message ) < 2 ) {
$error[ 'message' ] = 1;
$errorFlag = 1;
}

$string_exp = " /^[A-Za-z.'-]+$/";
//if( !isset( $name ) || !preg_match( $string_exp, $name ) ) {
// if( !isset( $name ) ) {

if( !isset( $name ) || strlen( $name ) < 1 ) {

$error[ 'name' ] = 1;
$errorFlag = 1;
}

$email_exp = '/^[A-Za-z0-9\._%-]+@[A-Za-z0-9\.-]+\.+[A-Za-z] (2,4)$/';
//if( !isset( $email ) || !preg_match( $email_exp, $email ) ) {
if( !isset( $email ) || !is_email( $email ) ) {
$error[ 'email' ] = 1;
$errorFlag = 1;
}

// no errors in form, continue sending the mail..
if( ! $errorFlag ) {
// determine the mail recipient
switch ( $category ) {
case 'will@bugorama.com':
$email_to = 'will@bugorama.com';
break;
case 'mike@bugorama.com':
$email_to = 'mike@bugorama.com';
break;
case 'info@bugorama.com':
$email_to = 'info@bugorama.com';
break;
default:
$email_to = 'info@bugorama.com';
}

// Here is the email to information
$email_subject = "From Website 2012 Contact Form - " . $name;
$email_from = "Bugorama Promotions 2012";

$email_message .= "Name: " . $name . "\r\n";
$email_message .= "Email: " . $email . "\r\n";
$email_message .= "Phone: " . $phone . "\r\n";
$email_message .= "Subject: " . wordwrap( $subject, 70 ) . "\r\n";
$email_message .= "Message:" . wordwrap( $message, 70 ) . "\r\n";

// Create email headers
$headers = 'From: ' .$email_from . "\r\n" . 'Reply-To:' . $email . "\r\n" . 'X-Mailer: PHP/' . phpversion();
@mail( $email_to, $email_subject, $email_message, $headers );

//@mail( $email, $email_subject, $email_message, $headers );

//header( 'Location: send_form.php' );
echo '<form action="send_form.php" method="post" name="sdset" id="sdset"><input type="hidden" name="category" id="category" value="'.$category.'" /><input type="hidden" name="name" value="'.$name.'" /><input type="hidden" name="email" id="email" value="'.$email.'" /><input type="hidden" name="message" value="'.$message.'" /><input type="hidden" name="phone" id="phone" value="'.$phone.'" /><input type="hidden" name="subject" value="'.$subject.'" /><input type="submit" value="Continue" style="height: 1px; width: 1px; display: none;" /><script type="text/javascript">document.sdset.submit();</script></form>';
}
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />

<meta name="robots" content="noindex" />

<style type="text/css">

*{ margin:0; padding:0;}
body{ font:100% normal Arial, Helvetica, sans-serif; }
form,input,select,textarea{margin:0; padding:0; color:#000000;}

/* contact form title box */
div.box {
margin:0 auto;
width:500px;
background:#b40610;
position:relative;
top:50px;
border:2px solid #b40610;
}

/* contact form box */
div.box h1 {
color:#ffffff;
font-size:18px;
text-transform:uppercase;
padding:5px 0 5px 5px;
}

div.box div {
width:100%;
display: block;
background:#ffffff;
padding:10px 0 10px 0;
}

div.box div span {
display: block;
color:#000000;
font-size:12px;
Font-weight: bold;
float:left;
width:110px;
text-align:right;
padding:5px 20px 0 0;
}

div.box .input_text {
padding:10px 10px;
width:300px;
background:#e1e1e1;
border: 1px solid #000000;
}

div.box .message{
padding:7px 7px;
width:330px;
background:#e1e1e1;
border: 1px solid #000000;
height:250px;
}

div.box .button
{
position: relative;
left:400px;
}
.errValid {
color: #FF0000;
}
.errMsg {
padding: 0px 0px 5px 130px;
background-color: #FFF;
font-size: 11px;
}
</style>

<title>Bugorama Promotions - CONTACT US</title>
<link href="css/default.css" rel="stylesheet" type="text/css" />
<script src="SpryAssets/SpryCollapsiblePanel.js" type="text/javascript"></script>
<link href="SpryAssets/SpryCollapsiblePanel.css" rel="stylesheet" type="text/css" />
<link rel="icon" href="favicon.ico" type="image/x-icon" />
<link rel="shortcut icon" href="favicon.ico" type="image/x-icon" />

<!-- <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.1/jquery.min.js" type="text/javascript"></script> -->
<script src="jquery.min.js" type="text/javascript"></script>
<script src="jquery.Scroller-1.0.min.js" type="text/javascript"></script>
<script type="text/javascript">
<!--
$(document).ready(function() {

//create scroller for each element with "horizontal_scroller" class...
$('.horizontal_scroller').SetScroller({ velocity: 40,
direction: 'horizontal',
startfrom: 'right',
loop: 'infinite',
movetype: 'linear',
onmouseover: 'pause',
onmouseout: 'play',
onstartup: 'play',
cursor: 'pointer'
});
/*
All possible values for options...

velocity: from 1 to 99 [default is 50]
direction: 'horizontal' or 'vertical' [default is 'horizontal']
startfrom: 'left' or 'right' for horizontal direction [default is 'right']
'top' or 'bottom' for vertical direction [default is 'bottom']
loop: from 1 to n+, or set 'infinite' [default is 'infinite']
movetype: 'linear' or 'pingpong' [default is 'linear']
onmouseover: 'play' or 'pause' [default is 'pause']
onmouseout: 'play' or 'pause' [default is 'play']
onstartup: 'play' or 'pause' [default is 'play']
cursor: 'pointer' or any other CSS style [default is 'pointer']
*/

//how to overwrite options after setup and without deleting the other settings...
$('#no_mouse_events').ResetScroller({ onmouseover: 'play', onmouseout: 'play' });
$('#scrollercontrol').ResetScroller({ velocity: 85, startfrom: 'left' });

//if you need to remove the scrolling animation, uncomment the following line...
//$('#scrollercontrol').RemoveScroller();

});
//-->
</script>

</head>

<body>

<div class="container">

<?php include_once("_top.php");?>

<div class="clearfloat"></div> <!-- clear floats -->

<?php include_once("_side.php");?>

<div class="content">

<div class="title">
<img src="graphics/titles/contact.jpg" width="600" height="91" alt="Contact Us" />
</div> <!-- end title div -->


<div style="width: 500px; margin: 20px auto 0px auto;">
<strong>Mailing Address:</strong><br />
P.O. Box 60873<br />
Sacramento,CA 95860<br />
<strong>Phone:</strong><br />
1-800-929-0077<br />
</div>


<form name="contactform" method="post" action="<?php echo $_SERVER[ 'PHP_SELF' ];?>">
<div class="box">

<h1>Contact Form :</h1>
<div>
<span>&nbsp;</span>
<p class="errValid">* marked fields are required</p>
</div>
<div>
<span>Category<font color="red"> *</font></span>
<select name="category" id="category">
<option value="0">Required Selection</option>
<option value="will@bugorama.com" <?php if(isset($_POST['category'])&&($_POST['category']=='will@bugorama.com')){echo 'selected="selected"';}?>>New Parts Vendor</option>
<option value="mike@bugorama.com" <?php if(isset($_POST['category'])&&($_POST['category']=='mike@bugorama.com')){echo 'selected="selected"';}?>>Sponsorship</option>
<option value="info@bugorama.com" <?php if(isset($_POST['category'])&&($_POST['category']=='info@bugorama.com')){echo 'selected="selected"';}?>>Other</option>
</select>
<?php
if( $error[ 'category' ] ) {
?>
<p class="errValid errMsg">Please select a category.</p>
<?php
}
?>
</div>

<div>
<span>Full Name<font color="red"> *</font></span>
<input type="text" class="input_text" name="name" id="name" value="<?php if(isset($_POST['name'])){echo $_POST['name'];};?>" />
<?php
if( $error[ 'name' ] ) {
?>
<p class="errValid errMsg">Please enter your full name.</p>
<?php
}
?>
</div>

<div>
<span>Email<font color="red"> *</font></span>
<input type="text" class="input_text" name="email" id="email" value="<?php if(isset($_POST['email'])){echo $_POST['email'];};?>" />
<?php
if( $error[ 'email' ] ) {
?>
<p class="errValid errMsg">Please enter your email address.</p>
<?php
}
?>
</div>

<div>
<span>Phone</span>
<input type="text" class="input_text" name="phone" id="phone" value="<?php if(isset($_POST['phone'])){echo $_POST['phone'];};?>" />
</div>

<div>
<span>Subject</span>
<input type="text" class="input_text" name="subject" id="subject" value="<?php if(isset($_POST['subject'])){echo $_POST['subject'];};?>" />
</div>

<div>
<span>Message<font color="red"> *</font></span>
<textarea name="message" id="message" class="message" rows="5" cols="50"><?php if(isset($_POST['message'])){echo $_POST['message'];};?></textarea>
<?php
if( $error[ 'message' ] ) {
?>
<p class="errValid errMsg">Please enter your message.</p>
<?php
}
?>
</div>

<div>
<input type="submit" value="submit" style="color: #b40610;" class="button" />
</div>
</div>

</form>

</div> <!-- end content div -->

<?php include_once("_bottom.php");?>

<div class="clearfloat"></div> <!-- clear floats -->

</div> <!-- end container div -->

<?php include_once("_end.php");?>

<p>&nbsp;</p>
<script type="text/javascript">
var CollapsiblePanel1 = new Spry.Widget.CollapsiblePanel("CollapsiblePanel1", {contentIsOpen:false});
var CollapsiblePanel2 = new Spry.Widget.CollapsiblePanel("CollapsiblePanel2", {contentIsOpen:false});
var CollapsiblePanel3 = new Spry.Widget.CollapsiblePanel("CollapsiblePanel3", {contentIsOpen:false});
var CollapsiblePanel4 = new Spry.Widget.CollapsiblePanel("CollapsiblePanel4", {contentIsOpen:false});
var CollapsiblePanel5 = new Spry.Widget.CollapsiblePanel("CollapsiblePanel5", {contentIsOpen:false});
var CollapsiblePanel6 = new Spry.Widget.CollapsiblePanel("CollapsiblePanel6", {contentIsOpen:false});
</script>
</body>
</html>default.css
@charset "UTF-8";
/* CSS Document */

/* ~~ Element/tag selectors ~~ */
ul, ol, dl { /* Due to variations between browsers, it's best practices to zero padding and margin on lists. For consistency, you can either specify the amounts you want here, or on the list items (LI, DT, DD) they contain. Remember that what you do here will cascade to the .nav list unless you write a more specific selector. */
padding: 0;
margin: 0;
}

a {
outline: 0;
}

a img { /* this selector removes the default blue border displayed in some browsers around an image when it is surrounded by a link */
border: none;
}

/* ~~ Styling for your site's links must remain in this order - including the group of selectors that create the hover effect. ~~ */
a:link {
color: #b40610;
text-decoration: none; /* unless you style your links to look extremely unique, it's best to provide underlines for quick visual identification */
}

.hiddenPic {display: none;}

a:link {color:#B40610; text-decoration:none;} /* unvisited link */
a:visited {color:#B40610; text-decoration:none;} /* visited link */
a:hover {color:#B40610; text-decoration:underline;} /* mouse over link */

a.specialLink:link { color: #ffea00; text-decoration:none; font-size: small }
a.specialLink:visited { color: #ffea00; text-decoration:none; }
a.specialLink:hover { color: #ffea00; text-decoration:underline; }

a.designedBy:link { color: #999999; text-decoration:none; }
a.designedBy:visited { color: #999999; text-decoration:none; }
a.designedBy:hover { color: #999999; text-decoration:underline; }
div:active, div:focus, div:hover {outline-style: none; -moz-outline-style:none;}

a:hover, a:active, a:focus { /* this group of selectors will give a keyboard navigator the same hover experience as the person using a mouse. */
text-decoration: underline;
}

body {
/* background-attachment: fixed; */
/* background-image:url(../graphics/backchainlink.jpg); */

background-image:url(../graphics/black-red-white-bg.jpg);
background-repeat: repeat-x;

margin: 0;
padding: 0;
color: #000;
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 100%;
line-height: 1.4;
background-color: #ffffff;
}

/* ~~this fixed width container surrounds the other divs~~ */
.container {
width: 960px;
background: #f1f1f1;
border: 2px solid #000000;
margin: 20px auto 0px; /* the auto value on the sides, coupled with the width, centers the layout */
}

.divcenter{
text-align: center;
}

.header {
background: #ffffff;
}

/* CSS for the scrollers */
div.horizontal_scroller {
position:relative;
height:24px;
width:960px;
display:block;
overflow:hidden;

}
div.scrollingtext{
position:absolute;
white-space:nowrap;
font-family:'Trebuchet MS',Arial;
font-size:16px;
color:#000000;
}

.navbar {
width: 960px;
height: 49px;
background-color: #ffffff;
background-repeat: no-repeat;
}

.navbar ul {
list-style-type: none;
}

/* default nav */

#nav {
width: 960px;
height: 49px;
position: relative;
background: url(../graphics/nav_main.png);
margin: 0px;
padding: 0px;
}

#nav li {
float: left;
}

#nav li a {
position: absolute;
top: 0;
margin: 0;
padding: 0;
display: block;
height: 49px;
background: url(../graphics/nav_main.png) no-repeat;
text-indent: -9999px;
overflow: hidden;
}

/* up nav */

li#nav_home a {
left: 0;
width: 108px;
background-position: 0 0;
}

li#nav_about a {
left: 108px;
width: 111px;
background-position: -108px 0;
}

li#nav_events a {
left: 219px;
width: 140px;
background-position: -219px 0;
}

li#nav_sponsors a {
left: 339px;
width: 143px;
background-position: -339px 0;
}

li#nav_vendor a {
left: 482px;
width: 174px;
background-position: -482px 0;
}

li#nav_drag a {
left: 656px;
width: 178px;
background-position: -656px 0;
}

li#nav_contact a {
left: 834px;
width: 126px;
background-position: -834px 0;
}

/* over nav */

li#nav_home a:hover {
background-position: 0 -49px;
}

li#nav_about a:hover {
background-position: -108px -49px;
}

li#nav_events a:hover {
background-position: -219px -49px;
}

li#nav_sponsors a:hover {
background-position: -339px -49px;
}

li#nav_vendor a:hover {
background-position: -482px -49px;
}

li#nav_drag a:hover {
background-position: -656px -49px;
}

li#nav_contact a:hover {
background-position: -834px -49px;
}

.sidebar1 {
float: left;
width: 230px;
background: #f1f1f1;
padding-bottom: 10px;
padding-left: 10px;
padding-right: 10px;
padding-top: 30px;
}

.content {
padding: 10px 10px;
width: 690px;
float: left;
}

.main_sponsors {
width: 690px;
height: 400px;
}

.small_sponsors {
width: 690px;
height: 400px;
}

.sponsors {
width: 690px;
}


.sponsor_left {
width: 344px;
float: left;
}

.sponsor_right {
width: 344px;
float: right;
}

.title {
width: 690px;
padding-bottom: 20px;
}

/* index divs flyer & videos */
#leftcolumn {
width: 420px;
float:left;
}
#rightcolumn {
width: 270px;
float: right;
}

iframe {
margin-bottom: 20px;
}

.bigvideo {
padding-top: 20px;
}

.bottomnav{
width: 960px;
}

.bottomcol {
float: left;
width: 210px;
padding: 15px;
vertical-align: top;
}

/* ~~ The footer ~~ */
.footer {
padding: 10px 0px 0px 10px;
position: relative;/* this gives IE6 hasLayout to properly clear */
clear: both; /* this clear property forces the .container to understand where the columns end and contain them */
}

/* ~~ miscellaneous float/clear classes ~~ */
.fltrt { /* this class can be used to float an element right in your page. The floated element must precede the element it should be next to on the page. */
float: right;
}

.fltlft { /* this class can be used to float an element left in your page. The floated element must precede the element it should be next to on the page. */
float: left;
}

.clearfloat { /* this class can be placed on a <br /> or empty div as the final element following the last floated div (within the #container) if the #footer is removed or taken out of the #container */
clear:both;
height: 0px;
font-size: 1px;
line-height: 0px;
}

BullDog
12-14-2011, 06:02 AM
is_email.php

too big to post

edbr
12-14-2011, 06:27 AM
yeesh!! lot to dredge through. can you try this as a de bug, is_email line 183

function is_email($email, $checkDNS = false, $errorlevel = false, &$parsedata = array()) {

try

function is_email($email, $checkDNS = false) {
just to see if error persists

BullDog
12-14-2011, 06:39 AM
I will try in a few... I got a hold of the guy that did the form for me via vworker.com

here is what he used to validate email:

http://code.google.com/p/isemail/source/browse/trunk/is_email.php?r=6

weird because it worked and validated before and now neither work.

edbr
12-14-2011, 07:03 AM
i also now saw
require_once 'is_email.php';
did you change this from?
require_once ('is_email.php');

BullDog
12-14-2011, 07:24 AM
he made the changes and my ftp access is down so I cant compare but he updated the function you mentioned and listed on the open source page I posted.

The form and validation is still over my head and hate that I cant figure it out. now I cant even get in to look at the changes he made. he made the changes and had me try it then neither of us could get back in. it displays, sends, and validates. but will have to test with the client to see if he is getting the emails correctly.

edbr
12-14-2011, 07:33 AM
its a pretty heavy duty script, i think its the validation thts throwing a wobbly , all links seem ok other than what i mentioned,

BullDog
12-14-2011, 07:35 AM
way over my head and maybe too much as there is a noticeable delay even when submitting the email.

All I wanted to do was validate it was a valid email. I see more straight forward methods but this is what he uses for all his forms. I may be asking for some direction soon as I have another site to do for the same person.

edbr
12-14-2011, 07:45 AM
my take on emails, and its my opinion no more than that, is the php validation is last defense, email check, empty fields and striping harmful code ,
first step is javascript client side , which although can be got round by neer do wells , it serves as a good form filling helper to genuine visitors and displays errors much quicker without calling the php serverside validation

BullDog
12-14-2011, 08:29 AM
Thank you... thats what I had started to do when I gave up and hired this guy on vworker. Just compared the new to the old file and he cut it from 1179 lines of code to 344. I will attempt to figure it out on the next one so I can debug myself hopefully.

edbr
12-16-2011, 02:32 AM
i was thinking about this and revisited a site that has been updated. It has a really good piece of kit re captcha
it is
very easy to adapt to needs, the full versions allow you own
font embed
own captcha background
multicoulor character return
character number
own choice of characters or from word list
refresh image
audio of captcha
uses javascript validation first php second before mailing

and basically you only need to configure your email address it is very well documented/ commented. i am impressed as you can probably tell :)
heres a simple one for trying out.

988

the website address fro download with all the bells and whistles (free BTW) is http://www.phpcaptcha.org

BullDog
12-16-2011, 02:37 AM
Thank you. I'll check it out.

edbr
12-17-2011, 01:41 AM
I will be interested to hear what you think about it

BullDog
12-17-2011, 10:07 PM
can someone please take a look at my contact form. the recipient cant reply to emails sent from the contact form. the option is greyed out for them.

http://www.bugorama.com/contact.php


<?php
/**
* No errors in form initially
*/
require_once 'is_email.php';
$error = array(
'name' => 0,
'email' => 0,
'category' => 0,
'message' => 0
);
$errorFlag = 0;

if( isset( $_POST[ 'email' ] ) ) {
function clean_string( $string ) {
$bad = array( "content-type", "bcc:", "to:", "cc:", "href" );
return trim( str_replace( $bad, "", $string ) );
}

$category = clean_string( $_POST['category'] );
$name = clean_string( $_POST['name'] );
$email = clean_string( $_POST['email'] );
$message = clean_string( $_POST['message'] );
$phone = clean_string( $_POST['phone'] );
$subject = clean_string( $_POST['subject'] );

if( !$category ) {
$error[ 'category' ] = 1;
$errorFlag = 1;
}

if( !isset( $message ) || strlen( $message ) < 2 ) {
$error[ 'message' ] = 1;
$errorFlag = 1;
}

$string_exp = " /^[A-Za-z.'-]+$/";
//if( !isset( $name ) || !preg_match( $string_exp, $name ) ) {
// if( !isset( $name ) ) {

if( !isset( $name ) || strlen( $name ) < 1 ) {

$error[ 'name' ] = 1;
$errorFlag = 1;
}

$email_exp = '/^[A-Za-z0-9\._%-]+@[A-Za-z0-9\.-]+\.+[A-Za-z] (2,4)$/';
//if( !isset( $email ) || !preg_match( $email_exp, $email ) ) {
if( !isset( $email ) || !is_email( $email ) ) {
$error[ 'email' ] = 1;
$errorFlag = 1;
}

// no errors in form, continue sending the mail..
if( ! $errorFlag ) {
// determine the mail recipient
switch ( $category ) {

case 'will@bugorama.com':
$email_to = 'will@bugorama.com';
break;
case 'mike@bugorama.com':
$email_to = 'mike@bugorama.com';
break;
case 'info@bugorama.com':
$email_to = 'info@bugorama.com';
break;
default:
$email_to = 'info@bugorama.com';
}

// Here is the email to information
$email_subject = "From Website 2012 Contact Form - " . $name;
$email_from = "Bugorama Promotions 2012";

$email_message .= "Name: " . $name . "\r\n";
$email_message .= "Email: " . $email . "\r\n";
$email_message .= "Phone: " . $phone . "\r\n";
$email_message .= "Subject: " . wordwrap( $subject, 70 ) . "\r\n";
$email_message .= "Message:" . wordwrap( $message, 70 ) . "\r\n";

// Create email headers
$headers = 'From: ' . $email_from . "\r\n" . 'Reply-To:' . $email . "\r\n" . 'X-Mailer: PHP/' . phpversion();
@mail( $email_to, $email_subject, $email_message, $headers );

//@mail( $email, $email_subject, $email_message, $headers );

//header( 'Location: send_form.php' );
echo '<form action="send_form.php" method="post" name="sdset" id="sdset"><input type="hidden" name="category" id="category" value="'.$category.'" /><input type="hidden" name="name" value="'.$name.'" /><input type="hidden" name="email" id="email" value="'.$email.'" /><input type="hidden" name="message" value="'.$message.'" /><input type="hidden" name="phone" id="phone" value="'.$phone.'" /><input type="hidden" name="subject" value="'.$subject.'" /><input type="submit" value="Continue" style="height: 1px; width: 1px; display: none;" /><script type="text/javascript">document.sdset.submit();</script></form>';
}
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />

<style type="text/css">

*{ margin:0; padding:0;}
body{ font:100% normal Arial, Helvetica, sans-serif; }
form,input,select,textarea{margin:0; padding:0; color:#000000;}

/* contact form title box */
div.box {
margin:0 auto;
width:500px;
background:#b40610;
position:relative;
top:50px;
border:2px solid #b40610;
}

/* contact form box */
div.box h1 {
color:#ffffff;
font-size:18px;
text-transform:uppercase;
padding:5px 0 5px 5px;
}

div.box div {
width:100%;
display: block;
background:#ffffff;
padding:10px 0 10px 0;
}

div.box div span {
display: block;
color:#000000;
font-size:12px;
Font-weight: bold;
float:left;
width:110px;
text-align:right;
padding:5px 20px 0 0;
}

div.box .input_text {
padding:10px 10px;
width:300px;
background:#e1e1e1;
border: 1px solid #000000;
}

div.box .message{
padding:7px 7px;
width:330px;
background:#e1e1e1;
border: 1px solid #000000;
height:250px;
}

div.box .button
{
position: relative;
left:400px;
}
.errValid {
color: #FF0000;
}
.errMsg {
padding: 0px 0px 5px 130px;
background-color: #FFF;
font-size: 11px;
}
</style>

<title>Bugorama Promotions - CONTACT US</title>
<link href="css/default.css" rel="stylesheet" type="text/css" />
<script src="SpryAssets/SpryCollapsiblePanel.js" type="text/javascript"></script>
<link href="SpryAssets/SpryCollapsiblePanel.css" rel="stylesheet" type="text/css" />
<link rel="icon" href="favicon.ico" type="image/x-icon" />
<link rel="shortcut icon" href="favicon.ico" type="image/x-icon" />

<!-- <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.1/jquery.min.js" type="text/javascript"></script> -->
<script src="jquery.min.js" type="text/javascript"></script>
<script src="jquery.Scroller-1.0.min.js" type="text/javascript"></script>
<script type="text/javascript">
<!--
$(document).ready(function() {

//create scroller for each element with "horizontal_scroller" class...
$('.horizontal_scroller').SetScroller({ velocity: 40,
direction: 'horizontal',
startfrom: 'right',
loop: 'infinite',
movetype: 'linear',
onmouseover: 'pause',
onmouseout: 'play',
onstartup: 'play',
cursor: 'pointer'
});
/*
All possible values for options...

velocity: from 1 to 99 [default is 50]
direction: 'horizontal' or 'vertical' [default is 'horizontal']
startfrom: 'left' or 'right' for horizontal direction [default is 'right']
'top' or 'bottom' for vertical direction [default is 'bottom']
loop: from 1 to n+, or set 'infinite' [default is 'infinite']
movetype: 'linear' or 'pingpong' [default is 'linear']
onmouseover: 'play' or 'pause' [default is 'pause']
onmouseout: 'play' or 'pause' [default is 'play']
onstartup: 'play' or 'pause' [default is 'play']
cursor: 'pointer' or any other CSS style [default is 'pointer']
*/

//how to overwrite options after setup and without deleting the other settings...
$('#no_mouse_events').ResetScroller({ onmouseover: 'play', onmouseout: 'play' });
$('#scrollercontrol').ResetScroller({ velocity: 85, startfrom: 'left' });

//if you need to remove the scrolling animation, uncomment the following line...
//$('#scrollercontrol').RemoveScroller();

});
//-->
</script>

</head>

<body>

<div class="container">

<?php include_once("_top.php");?>

<div class="clearfloat"></div> <!-- clear floats -->

<?php include_once("_side.php");?>

<div class="content">

<div class="title">
<img src="graphics/titles/contact.jpg" width="600" height="91" alt="Contact Us" />
</div> <!-- end title div -->


<div style="width: 500px; margin: 20px auto 0px auto;">
<strong>Mailing Address:</strong><br />
P.O. Box 60873<br />
Sacramento,CA 95860<br />
<strong>Phone:</strong><br />
1-800-929-0077<br />
</div>


<form name="contactform" method="post" action="<?php echo $_SERVER[ 'PHP_SELF' ];?>">
<div class="box">

<h1>Contact Form :</h1>
<div>
<span>&nbsp;</span>
<p class="errValid">* marked fields are required</p>
</div>
<div>
<span>Category<font color="red"> *</font></span>
<select name="category" id="category">
<option value="0">Required Selection</option>
<option value="will@bugorama.com" <?php if(isset($_POST['category'])&&($_POST['category']=='will@bugorama.com')){echo 'selected="selected"';}?>>New Parts Vendor</option>
<option value="mike@bugorama.com" <?php if(isset($_POST['category'])&&($_POST['category']=='mike@bugorama.com')){echo 'selected="selected"';}?>>Sponsorship</option>
<option value="info@bugorama.com" <?php if(isset($_POST['category'])&&($_POST['category']=='info@bugorama.com')){echo 'selected="selected"';}?>>Other</option>
</select>
<?php
if( $error[ 'category' ] ) {
?>
<p class="errValid errMsg">Please select a category.</p>
<?php
}
?>
</div>

<div>
<span>Full Name<font color="red"> *</font></span>
<input type="text" class="input_text" name="name" id="name" value="<?php if(isset($_POST['name'])){echo $_POST['name'];};?>" />
<?php
if( $error[ 'name' ] ) {
?>
<p class="errValid errMsg">Please enter your full name.</p>
<?php
}
?>
</div>

<div>
<span>Email<font color="red"> *</font></span>
<input type="text" class="input_text" name="email" id="email" value="<?php if(isset($_POST['email'])){echo $_POST['email'];};?>" />
<?php
if( $error[ 'email' ] ) {
?>
<p class="errValid errMsg">Please enter your email address.</p>
<?php
}
?>
</div>

<div>
<span>Phone</span>
<input type="text" class="input_text" name="phone" id="phone" value="<?php if(isset($_POST['phone'])){echo $_POST['phone'];};?>" />
</div>

<div>
<span>Subject</span>
<input type="text" class="input_text" name="subject" id="subject" value="<?php if(isset($_POST['subject'])){echo $_POST['subject'];};?>" />
</div>

<div>
<span>Message<font color="red"> *</font></span>
<textarea name="message" id="message" class="message" rows="5" cols="50"><?php if(isset($_POST['message'])){echo $_POST['message'];};?></textarea>
<?php
if( $error[ 'message' ] ) {
?>
<p class="errValid errMsg">Please enter your message.</p>
<?php
}
?>
</div>

<div>
<input type="submit" value="submit" style="color: #b40610;" class="button" />
</div>
</div>

</form>

</div> <!-- end content div -->

<?php include_once("_bottom.php");?>

<div class="clearfloat"></div> <!-- clear floats -->

</div> <!-- end container div -->

<?php include_once("_end.php");?>

<p>&nbsp;</p>
<script type="text/javascript">
var CollapsiblePanel1 = new Spry.Widget.CollapsiblePanel("CollapsiblePanel1", {contentIsOpen:false});
var CollapsiblePanel2 = new Spry.Widget.CollapsiblePanel("CollapsiblePanel2", {contentIsOpen:false});
var CollapsiblePanel3 = new Spry.Widget.CollapsiblePanel("CollapsiblePanel3", {contentIsOpen:false});
var CollapsiblePanel4 = new Spry.Widget.CollapsiblePanel("CollapsiblePanel4", {contentIsOpen:false});
var CollapsiblePanel5 = new Spry.Widget.CollapsiblePanel("CollapsiblePanel5", {contentIsOpen:false});
var CollapsiblePanel6 = new Spry.Widget.CollapsiblePanel("CollapsiblePanel6", {contentIsOpen:false});
</script>
</body>
</html>

BullDog
12-17-2011, 10:37 PM
I added my email to the list and I can reply to the submitted contact form when received via comcast webmail. they have tried to reply via microsoft live mail and outlook express, and niether will allow them to reply.

BullDog
12-18-2011, 10:20 PM
I had them check their mail via webmail and it is ok there. so my best guess is that the reply-to is not being passed to the email clients. I'm not sure if that helps at all but I still cant find any info about this problem.

Thanx

edbr
12-19-2011, 01:19 AM
sounds like a spam blocker

BullDog
12-19-2011, 01:34 AM
wouldnt most spam blockers block the mail completely. they can open it and click on the email address in the header but cant reply or replay to all

edbr
12-19-2011, 01:43 AM
sorry misunderstood your post (its monday morning here}

just check
echo $email; on your page after the clean string function to check its ot being stripped there

BullDog
12-19-2011, 01:52 AM
wouldnt that strip it in both email client and webmail? they are able to reply via webmail but if received in an email client the reply option is greyed out.

BullDog
12-19-2011, 01:54 AM
it does display their email address in the resulting email so they can click on the email address to reply directly, but they cant reply with the email body included. hope that makes sense.

BullDog
12-19-2011, 03:12 AM
I had a couple people check and it works fine as is. I dont think its client spam blocking as it has the same problem on two different systems with two different clients. My guess is they are running a virus protection package of some kind causing the issue for them. now to try and address this over the phone with computer illiterate people and with a program I'm sure I dont know will be the fun part!

Thanx for looking at it again.

jonathan3880
12-21-2011, 07:52 AM
I really like this post. I like this one. Keep it up.