Code: Select all
<!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" lang="en" xml:lang="en">
<head><?
// only validate form when form is submitted
if(isset($submit_button))
{
$error_msg='';
$error_msg_name='';
$error_msg_org='';
$error_msg_add='';
$error_msg_city='';
$error_msg_state='';
$error_msg_zip='';
$error_msg_area='';
$error_msg_phone='';
$error_msg_email='';
$error_msg_email2='';
$error_msg_makeover='';
if(trim($first_name_input)=='') {
$error_msg_name.="Please Input Your Name<br>";
}
if(trim($organization_input)=='') {
$error_msg_org.="Please enter your Organization<br>";
}
if(trim($address_input)=='') {
$error_msg_add.="Please enter your Address<br>";
}
if(trim($city_input)=='') {
$error_msg_city.="Please enter your City<br>";
}
if(trim($state_input)=='' || strlen(trim($zip_input)) <2) {
if(!ereg("^[A-Za-z]", $state_input)) $error_msg_state.="Please enter your State<br>";
}
if(trim($zip_input)=='' || strlen(trim($zip_input)) <5) {
if(!ereg("^[0-9]", $zip_input)) $error_msg_zip.="Please Input Your Zip Code<br>";
}
if(trim($area_input)=='' || strlen(trim($area_input)) <3) {
if(!ereg("^[0-9]", $area_input)) $error_msg_area.="Please Input Your Area Code<br>";
}
if(trim($phone_input)=='' || strlen(trim($phone_input)) <3){
if(!ereg("^[0-9]", $phone_input)) $error_msg_phone.="Please Input Your Phone Number<br>";
}
if(trim($phone2_input)=='' || strlen(trim($phone2_input)) <4) {
if(!ereg("^[0-9]", $phone2_input)) $error_msg_phone.="Please Input Your Phone Number<br>";
}
if(trim($email_input)=='') {
$error_msg_email.="Please enter an Email Address<br>";
}
else {
// check if email is a valid address in this format username@domain.com
if(!ereg("[0-9a-z]([-_.]?[0-9a-z])*@[0-9a-z]([-.]?[0-9a-z])*\\.[a-z]", $email_input)) $error_msg_email2.="Please enter a valid email address<br>";
}
if(trim($makeover_input)=='') {
$error_msg_makeover.="Please enter the reason you need a Marketing Makover<br>";
}
// display error message if any, if not, proceed to other processing
if($error_msg==''){
// other process here
} else {
echo "<font color=red>$error_msg</font>";
}
}
?>
<?php
//Your name
$recipientname = "first_name_input";
//Your email
$recipientemail = "angeldevoidv3@gmail.com";
//send Autoresponse?
$autoresponse = "yes";
//Subject of Autoresponse
$autosubject = "Mellon Technology Service Marketing Makover";
//Autoresponse message
$automessage ='Thank you for your entry. Contest ends Nov. 1st
Thank you,
Mellon Technology Service
http://www.mellontech.com';
//Thank you after submit
$thanks = '<!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" lang="en" xml:lang="en">
<head>
<title>Contest: Corporate Identity Marketing Package by Mellon Technology Service, Olean, New York</title>
<meta name="description" content="Mellon Technology Service is an agency in Olean, New York offering creative and computer services including web site design, graphic design, corporate identity, integrated marketing communications, programming, networking, PC and Mac support and repairs." />
<meta name="keywords" content="Mellon, technology, service, Mellon Technology Service, Olean, New York, NY, web site design, web designer, web designers, graphic design, graphics, graphic artist, graphic artists, flash design, flash designer, flash, internet, search engine optimization, HTML, PHP, CSS, web, site, design, designs, corporate identity, marketing, integrated marketing communications, creative, communications, communication, programming, networking" />
<meta name="ABSTRACT" content="Mellon Technology Service is an agency in Olean, New York offering creative and computer services including web site design, graphic design, corporate identity, integrated marketing communications, programming, networking, PC and Mac support and repairs." />
<meta name="REVISIT-AFTER" content="19 Days" />
<meta name="DISTRIBUTION" content="Global" />
<meta name="ROBOTS" content="INDEX, FOLLOW" />
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link href="mellontech.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
.style2 {font-size: 14px}
.style5 {font-size: 16px}
.style6 {font-size: 12px; }
-->
</style>
</head>
<body>
<table width="750" border="0" cellpadding="0" cellspacing="0" id="wrapper">
<tr>
<td width="9" rowspan="3" valign="top" class="silverbar"><img src="../images/silverbar.jpg" width="9px" height="356px"></td>
<td valign="top" class="tablebg">
<div id="masthead">
<div id="logo"><img src="../images/mellontech_logo2.jpg" width="179px" height="181px" alt="Mellon Technology Service" /></div>
<div id="flash"></div>
<div class="style2" id="mainNav"></div>
</div>
<div id="content">
<center>
<p align="center" class="style5"> </p>
<p align="center" class="style5"> </p>
<p align="center" class="style5"><strong>Thank you for entering. </strong></p>
<p align="center" class="style5"><strong>The Marketing Makeover Contest ends November 1st. </strong></p>
<p align="center" class="style5"><strong>We will contact you if you are a winner. </strong></p>
<p align="center" class="style5"><strong>Good luck! </strong></p>
<h1> </h1>
<p> </p>
</center>
</div>
<div id="leftmenubar">
<div id="subNav">
<ul>
<li>
<li><a href="http://contest.mellontech.com">Home</a></li>
<li><a href="http://contest.mellontech.com/examples.html">Corporate ID Examples</a></li>
<li><a target="_blank" href="http://www.whatisimc.com">What Is IMC?</a></li>
<li><a href="http://contest.mellontech.com/enter.php">Enter to Win </a></li>
<li><a href="http://contest.mellontech.com/terms.html">Terms & Conditions</a></li>
</li>
<li><a href="http://www.mellontech.com/tina.html"></a></li>
</ul>
</div>
<div align="center"><img src="../images/ReliabilitySeal.GIF" width="90px" height="32px" alt="BBB OnLine Reliability Program" /> </div>
</div> </td>
<td width="9" rowspan="3" valign="top" class="silverbar"><img src="../images/silverbar.jpg" width="9" height="356"></td>
</tr>
<tr valign="top">
<td colspan="2" class="footercell">
<div id="footer">Copyright © 2006 Mellon Technology Service</div> </td>
</tr>
</table>
</body>
</html> ';
//close php
?><
<title>ENTER: Corporate Identity Marketing Package Contest by Mellon Technology Service, Olean, New York</title>
<meta name="description" content="Mellon Technology Service is an agency in Olean, New York offering creative and computer services including web site design, graphic design, corporate identity, integrated marketing communications, programming, networking, PC and Mac support and repairs." />
<meta name="keywords" content="Mellon, technology, service, Mellon Technology Service, Olean, New York, NY, web site design, web designer, web designers, graphic design, graphics, graphic artist, graphic artists, flash design, flash designer, flash, internet, search engine optimization, HTML, PHP, CSS, web, site, design, designs, corporate identity, marketing, integrated marketing communications, creative, communications, communication, programming, networking" />
<meta name="ABSTRACT" content="Mellon Technology Service is an agency in Olean, New York offering creative and computer services including web site design, graphic design, corporate identity, integrated marketing communications, programming, networking, PC and Mac support and repairs." />
<meta name="REVISIT-AFTER" content="19 Days" />
<meta name="DISTRIBUTION" content="Global" />
<meta name="ROBOTS" content="INDEX, FOLLOW" />
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link href="../My%20Documents/web/form/test/mellontech.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
.style2 {font-size: 14px}
.style3 {font-size: 16px}
-->
</style>
</head>
<body>
<?php
if($_POST['submit_button'])
{
$name1 = $HTTP_POST_VARS['first_name_input'];
$name2 = $HTTP_POST_VARS['organization_input'];
$email = $HTTP_POST_VARS['email_input'];
$address = $HTTP_POST_VARS['address_input'];
$address2 = $HTTP_POST_VARS['address2_input'];
$state = $HTTP_POST_VARS['state_input'];
$city = $HTTP_POST_VARS['city_input'];
$zipcode= $HTTP_POST_VARS['zip_input'];
$area= $HTTP_POST_VARS['area_input'];
$farea= $HTTP_POST_VARS['faxarea_input'];
$prefix=$HTTP_POST_VARS['phone_input'];
$number=$HTTP_POST_VARS['phone2_input'];
$fprefix=$HTTP_POST_VARS['fax_input'];
$fnumber=$HTTP_POST_VARS['fax2_input'];
$makeover=$HTTP_POST_VARS['makeover_input'];
$browser = $HTTP_USER_AGENT;
$ip = $REMOTE_ADDR;
//format message
$message = "Online Response for $name1 - $name2:
Name= $name1
Organization= $name2
Address= $address
$city
$state
$zipcode
Phone= ($area) $prefix-$number
Email= $email
Why we need a Marketing Makeover= $makeover
---------------------------------------
browser: $browser
IP: $IP";
//send mail and success message
//Subject of email to you
$subject = "Contest Submission for $name1 - $name2";
mail($recipientemail, "$subject", "$message", "From: $name1 $name2 <$email>");
if($autoresponse=="yes")
{
$autosubject = $autosubject;
$automessage = $automessage;
mail($email, "$autosubject", "$automessage", "From:Company or Persons Name<$recipientemail>");
}
echo "$thanks";
}
else
{
?>
<table width="750" border="0" cellpadding="0" cellspacing="0" id="wrapper">
<tr>
<td width="9" rowspan="3" valign="top" class="silverbar"><img src="../My%20Documents/web/form/images/silverbar.jpg" width="9px" height="356px"></td>
<td valign="top" class="tablebg">
<div id="masthead">
<div id="logo"><img src="../My%20Documents/web/form/images/mellontech_logo2.jpg" width="179px" height="181px" alt="Mellon Technology Service" /></div>
<div id="flash"> </div>
<div class="style2" id="mainNav">
<ul>
<li>
<p style="text-align: center"><a href="#" class="style3">Enter to Win! </a></li>
</ul>
</div>
</div>
<div id="content">
<center>
<h1>Marketing Makeover By Mellon Technology Service! </h1>
<form action="" method="post" name="form1" id="form1" onSubmit="return CheckRequiredFields()">
<p>Name:<input type="text" name="first_name_input" size="50" value="<? echo $first_name_input; ?>"><br>
<?php echo "<font color=red>$error_msg_name</font>";?></p>
<p>Organization: <input type="text" name="organization_input" size="40" value="<? echo $organization_input; ?>"><br>
<?php echo "<font color=red>$error_msg_org</font>"; ?></p>
<p>Street Address: <input type="text" name="address_input" size="37" value="<? echo $address_input; ?>"><br>
<?php echo "<font color=red>$error_msg_add</font>";?></p>
<p>City: <input type="text" name="city_input" size="20" value="<? echo $city_input; ?>">
State:
<input type="text" name="state_input" size="2" maxlength="2" value="<? echo $state_input; ?>"><br>
<?php echo "<font color=red>$error_msg_city</font>"; ?>
<?php echo "<font color=red>$error_msg_state</font>";?> </p>
<p>Zip Code: <input type="text" name="zip_input" size="5" maxlength="5" value="<? echo $zip_input; ?>">
Phone #:
<input type="text" name="area_input" maxlength="3" size="3" value="<? echo $area_input; ?>">-
<input type="text" name="phone_input" maxlength="3" size="3" value="<? echo $phone_input; ?>">-
<input type="text" name="phone2_input" maxlength="4" size="4" value="<? echo $phone2_input; ?>"><br>
<?php echo "<font color=red>$error_msg_zip</font>";?>
<?php echo "<font color=red>$error_msg_area</font>";echo "<font color=red>$error_msg_phone</font>";?></p>
<p>Email: <input type="text" name="email_input" size="50" value="<? echo $email_input; ?>"><br>
<?php echo "<font color=red>$error_msg_email</font>"; echo"<font color=red>$error_msg_email2</font>";?></p>
<p>Why do you need a marketing makeover?</p>
<p><textarea rows="7" name="makeover_input" cols="32" value="<? echo $makeover_input; ?>"></textarea><br>
<?php echo "<font color=red>$error_msg_makeover</font>";?></p>
<p> <input type="submit" value=" Submit " name="submit_button"><input type="reset" value="Reset" name="B2"></p>
</form>
<p align="center"><strong>You may also enter by submitting this information to: </strong></p>
<p align="center"><strong>1606 West State Street, Olean, NY 14760</strong></p>
<p align="center"><strong>716-372-5996 or toll free at 888-372-5996</strong></p>
<p align="center"><strong> e-mail: <a href="mailto:info@mellontech.com">info@mellontech.com</a></strong></p>
<p align="center"> </p>
<p align="center"> </p>
<p> </p>
</center>
</div>
<div id="leftmenubar">
<div id="subNav">
<ul>
<li><a href="http://contest.mellontech.com">Home</a></li>
<li><a href="http://contest.mellontech.com/examples.html">Corporate ID Examples</a></li>
<li><a target="_blank" href="http://www.whatisimc.com">What Is IMC?</a></li>
<li><a href="http://contest.mellontech.com/enter.html">Enter to Win </a></li>
<li><a href="http://contest.mellontech.com/terms.html">Terms & Conditions</a></li>
</ul>
</div>
<div align="center"><img src="../My%20Documents/web/form/images/ReliabilitySeal.GIF" width="90px" height="32px" alt="BBB OnLine Reliability Program" /> </div>
</div> </td>
<td width="9" rowspan="3" valign="top" class="silverbar"><img src="../My%20Documents/web/form/images/silverbar.jpg" width="9" height="356"></td>
</tr>
<tr valign="top">
<td colspan="2" class="footercell">
<div id="footer">Copyright © 2006 Mellon Technology Service</div> </td>
</tr>
</table>
<?php } ?>
</body>
</html>