Jump to content

email says from"bjjnews488@shosting.com" instead of my email address...


aaricwon

Recommended Posts

here you go... Thanks!

 


 

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html>

<head>

<title>TUFF-N-UFF Fighter Registration</title>

<meta http-equiv="content-type" content="text/html; charset=UTF-8"><link href="style.css" rel="stylesheet" type="text/css">

<!-- calendar stuff -->

      <link rel="stylesheet" type="text/css" href="calendar/calendar-blue2.css" />

      <script type="text/javascript" src="calendar/calendar.js"></script>

      <script type="text/javascript" src="calendar/calendar-en.js"></script>

      <script type="text/javascript" src="calendar/calendar-setup.js"></script>

<!-- END calendar stuff -->

 

    <!-- expand/collapse function -->

    <SCRIPT type=text/javascript>

<!--

function collapseElem(obj)

{

var el = document.getElementById(obj);

el.style.display = 'none';

}

 

 

function expandElem(obj)

{

var el = document.getElementById(obj);

el.style.display = '';

}

 

 

//-->

</SCRIPT>

<!-- expand/collapse function -->

 

 

<!-- expand/collapse function -->

    <SCRIPT type=text/javascript>

<!--

 

// collapse all elements, except the first one

function collapseAll()

{

var numFormPages = 1;

 

for(i=2; i <= numFormPages; i++)

{

currPageId = ('mainForm_' + i);

collapseElem(currPageId);

}

}

 

 

//-->

</SCRIPT>

<!-- expand/collapse function -->

 

 

<!-- validate -->

<SCRIPT type=text/javascript>

<!--

function validateField(fieldId, fieldBoxId, fieldType, required)

{

fieldBox = document.getElementById(fieldBoxId);

fieldObj = document.getElementById(fieldId);

 

if(fieldType == 'text'  ||  fieldType == 'textarea'  ||  fieldType == 'password'  ||  fieldType == 'file'  ||  fieldType == 'phone'  || fieldType == 'website')

{

if(required == 1 && fieldObj.value == '')

{

fieldObj.setAttribute("class","mainFormError");

fieldObj.setAttribute("className","mainFormError");

fieldObj.focus();

return false;

}

 

}

 

 

else if(fieldType == 'menu'  || fieldType == 'country'  || fieldType == 'state')

{

if(required == 1 && fieldObj.selectedIndex == 0)

{

fieldObj.setAttribute("class","mainFormError");

fieldObj.setAttribute("className","mainFormError");

fieldObj.focus();

return false;

}

 

}

 

 

else if(fieldType == 'email')

{

if((required == 1 && fieldObj.value=='')  ||  (fieldObj.value!=''  && !validate_email(fieldObj.value)))

{

fieldObj.setAttribute("class","mainFormError");

fieldObj.setAttribute("className","mainFormError");

fieldObj.focus();

return false;

}

 

}

 

 

 

}

 

function validate_email(emailStr)

{

apos=emailStr.indexOf("@");

dotpos=emailStr.lastIndexOf(".");

 

if (apos<1||dotpos-apos<2)

{

return false;

}

else

{

return true;

}

}

 

 

function validateDate(fieldId, fieldBoxId, fieldType, required,  minDateStr, maxDateStr)

{

retValue = true;

 

fieldBox = document.getElementById(fieldBoxId);

fieldObj = document.getElementById(fieldId);

dateStr = fieldObj.value;

 

 

if(required == 0  && dateStr == '')

{

return true;

}

 

 

if(dateStr.charAt(2) != '/'  || dateStr.charAt(5) != '/' || dateStr.length != 10)

{

retValue = false;

}

 

else // format's okay; check max, min

{

currDays = parseInt(dateStr.substr(0,2),10) + parseInt(dateStr.substr(3,2),10)*30  + parseInt(dateStr.substr(6,4),10)*365;

//alert(currDays);

 

if(maxDateStr != '')

{

maxDays = parseInt(maxDateStr.substr(0,2),10) + parseInt(maxDateStr.substr(3,2),10)*30  + parseInt(maxDateStr.substr(6,4),10)*365;

//alert(maxDays);

if(currDays > maxDays)

retValue = false;

}

 

if(minDateStr != '')

{

minDays = parseInt(minDateStr.substr(0,2),10) + parseInt(minDateStr.substr(3,2),10)*30  + parseInt(minDateStr.substr(6,4),10)*365;

//alert(minDays);

if(currDays < minDays)

retValue = false;

}

}

 

if(retValue == false)

{

fieldObj.setAttribute("class","mainFormError");

fieldObj.setAttribute("className","mainFormError");

fieldObj.focus();

return false;

}

}

//-->

</SCRIPT>

<!-- end validate -->

 

 

 

 

</head>

 

<body onLoad="collapseAll()">

 

<div id="mainForm">

 

 

 

 

<div id="formHeader">

<h2 class="formInfo">TUFF-N-UFF</h2>

<p class="formInfo">Fighter Registration</p>

</div>

 

 

<BR/><!-- begin form -->

<form method=post enctype=multipart/form-data action=processor.php onSubmit="return validatePage1();"><ul class=mainForm id="mainForm_1">

 

<li class="mainForm" id="fieldBox_1">

<label class="formFieldQuestion">First Name *</label><input class=mainForm type=text name=field_1 id=field_1 size='8' value=''></li>

 

<li class="mainForm" id="fieldBox_2">

<label class="formFieldQuestion">Last Name *</label><input class=mainForm type=text name=field_2 id=field_2 size='20' value=''></li>

 

<li class="mainForm" id="fieldBox_3">

<label class="formFieldQuestion">Nick Name</label><input class=mainForm type=text name=field_3 id=field_3 size='20' value=''></li>

 

<li class="mainForm" id="fieldBox_4">

<label class="formFieldQuestion">Date of Birth</label><input type=text  name=field_4 id=field_4 value=""><button type=reset class=calendarStyle id=fieldDateTrigger_4></button><SCRIPT type='text/javascript'>  Calendar.setup({

inputField    :    "field_4",

ifFormat      :    "%m/%d/%Y",

showsTime      :    false,

button        :    "fieldDateTrigger_4",

singleClick    :    true,

step          :    1

});</SCRIPT></li>

 

<li class="mainForm" id="fieldBox_5">

<label class="formFieldQuestion">E-mail Address *</label><input class=mainForm type=email name=field_5 id=field_5 size=20 value="" style="background-image:url(imgs/email.png); background-repeat: no-repeat;  padding: 2px 2px 2px 25px;"></li>

 

<li class="mainForm" id="fieldBox_6">

<label class="formFieldQuestion">Telephone *</label><input class=mainForm type=phone name=field_6 id=field_6 size=20 value="" style="background-image:url(imgs/phone.png); background-repeat: no-repeat;  padding: 2px 2px 2px 25px;"></li>

 

<li class="mainForm" id="fieldBox_7">

<label class="formFieldQuestion">City *</label><input class=mainForm type=text name=field_7 id=field_7 size='20' value=''></li>

 

<li class="mainForm" id="fieldBox_8">

<label class="formFieldQuestion">State *</label><select class=mainForm name=field_8 id=field_8><option value=''> </option><option value="Alabama">Alabama</option><option value="Alaska">Alaska</option><option value="Arizona">Arizona</option><option value="Arkansas">Arkansas</option><option value="California">California</option><option value="Colorado">Colorado</option><option value="Connecticut">Connecticut</option><option value="Delaware">Delaware</option><option value="Florida">Florida</option><option value="Georgia">Georgia</option><option value="Hawaii">Hawaii</option><option value="Idaho">Idaho</option><option value="Illinois">Illinois</option><option value="Indiana">Indiana</option><option value="Iowa">Iowa</option><option value="Kansas">Kansas</option><option value="Kentucky">Kentucky</option><option value="Louisiana">Louisiana</option><option value="Maine">Maine</option><option value="Maryland">Maryland</option><option value="Massachusetts">Massachusetts</option><option value="Michigan">Michigan</option><option value="Minnesota">Minnesota</option><option value="Mississippi">Mississippi</option><option value="Missouri">Missouri</option><option value="Montana">Montana</option><option value="Nebraska">Nebraska</option><option value="Nevada">Nevada</option><option value="New Hampshire">New Hampshire</option><option value="New Jersey">New Jersey</option><option value="New Mexico">New Mexico</option><option value="New York">New York</option><option value="North Carolina">North Carolina</option><option value="North Dakota">North Dakota</option><option value="Ohio">Ohio</option><option value="Oklahoma">Oklahoma</option><option value="Oregon">Oregon</option><option value="Pennsylvania">Pennsylvania</option><option value="Rhode Island">Rhode Island</option><option value="South Carolina">South Carolina</option><option value="South Dakota">South Dakota</option><option value="Tennessee">Tennessee</option><option value="Texas">Texas</option><option value="Utah">Utah</option><option value="Vermont">Vermont</option><option value="Virginia">Virginia</option><option value="Washington">Washington</option><option value="West Virginia">West Virginia</option><option value="Wisconsin">Wisconsin</option><option value="Wyoming">Wyoming</option></SELECT></li>

 

<li class="mainForm" id="fieldBox_9">

<label class="formFieldQuestion">Current Status *</label><select class=mainForm name=field_9 id=field_9><option value=''></option><option value="Professional">Professional</option><option value="Amateur">Amateur</option></select></li>

 

<li class="mainForm" id="fieldBox_10">

<label class="formFieldQuestion">Amateur Fight Record <a class=info href=#><img src=imgs/tip_small.png border=0><span class=infobox>Please include all fights as an amateur</span></a></label><input class=mainForm type=text name=field_10 id=field_10 size='13' value='Win/Loss/Draw'></li>

 

<li class="mainForm" id="fieldBox_11">

<label class="formFieldQuestion">Professional Fight Record <a class=info href=#><img src=imgs/tip_small.png border=0><span class=infobox>Please include all fights as a professional. If you fight as an amateur please mark this 00/00/00</span></a></label><input class=mainForm type=text name=field_11 id=field_11 size='13' value='Win/Loss/Draw'></li>

 

<li class="mainForm" id="fieldBox_12">

<label class="formFieldQuestion">Have you held any titles <a class=info href=#><img src=imgs/tip_small.png border=0><span class=infobox>Please list all titles, past and present that you have held.</span></a></label><textarea class=mainForm  name=field_12 id=field_12 rows=7 cols=35></textarea></li>

 

<li class="mainForm" id="fieldBox_13">

<label class="formFieldQuestion">Fight Weight *</label><select class=mainForm name=field_13 id=field_13><option value=''></option><option value="Welterweight">Welterweight</option><option value="Lightweight">Lightweight</option><option value="Middleweight">Middleweight</option><option value="Light Heavyweight">Light Heavyweight</option><option value="Heavyweight">Heavyweight</option><option value="Super Heavyweight">Super Heavyweight</option><option value="Featherweight">Featherweight</option><option value="Under 120lbs">Under 120lbs</option></select></li>

 

<li class="mainForm" id="fieldBox_14">

<label class="formFieldQuestion">Fight Style</label><select class=mainForm name=field_14 id=field_14><option value=''></option><option value="Mixed Martial Arts">Mixed Martial Arts</option><option value="Kickboxing">Kickboxing</option><option value="Grappling">Grappling</option></select></li>

 

<li class="mainForm" id="fieldBox_15">

<label class="formFieldQuestion">Team or Affiliation <a class=info href=#><img src=imgs/tip_small.png border=0><span class=infobox>Who do you train with? Are you a part of any team?</span></a></label><input class=mainForm type=text name=field_15 id=field_15 size='20' value=''></li>

 

<li class="mainForm" id="fieldBox_16">

<label class="formFieldQuestion">Website or Myspace <a class=info href=#><img src=imgs/tip_small.png border=0><span class=infobox>If you have a website or myspace page please list it here.</span></a></label><input class=mainForm type=website name=field_16 id=field_16 size=20 value="" style="background-image:url(imgs/website.png); background-repeat: no-repeat;  padding: 2px 2px 2px 25px;"></li>

 

<li class="mainForm" id="fieldBox_17">

<label class="formFieldQuestion">Your Picture <a class=info href=#><img src=imgs/tip_small.png border=0><span class=infobox>If you have a photo of yourself please attach it. If you have a picture of you in fight stance, use that.</span></a></label><input class=mainForm type=file name=field_17 id=field_17 value=""></li>

 

<li class="mainForm" id="fieldBox_18">

<label class="formFieldQuestion">Additional Notes or Comments <a class=info href=#><img src=imgs/tip_small.png border=0><span class=infobox>If you have anything else you would like for us to know about you or take into consideration while reviewing your registration please enter it here.</span></a></label><textarea class=mainForm  name=field_18 id=field_18 rows=12 cols=35></textarea></li>

 

 

<!-- end of this page -->

 

<!-- page validation -->

<SCRIPT type=text/javascript>

<!--

function validatePage1()

{

retVal = true;

if (validateField('field_1','fieldBox_1','text',1) == false)

retVal=false;

if (validateField('field_2','fieldBox_2','text',1) == false)

retVal=false;

if (validateField('field_3','fieldBox_3','text',0) == false)

retVal=false;

if (validateDate('field_4','fieldBox_4','date',0,'','') == false)

retVal=false;

if (validateField('field_5','fieldBox_5','email',1) == false)

retVal=false;

if (validateField('field_6','fieldBox_6','phone',1) == false)

retVal=false;

if (validateField('field_7','fieldBox_7','text',1) == false)

retVal=false;

if (validateField('field_8','fieldBox_8','state',1) == false)

retVal=false;

if (validateField('field_9','fieldBox_9','menu',1) == false)

retVal=false;

if (validateField('field_10','fieldBox_10','text',0) == false)

retVal=false;

if (validateField('field_11','fieldBox_11','text',0) == false)

retVal=false;

if (validateField('field_12','fieldBox_12','textarea',0) == false)

retVal=false;

if (validateField('field_13','fieldBox_13','menu',1) == false)

retVal=false;

if (validateField('field_14','fieldBox_14','menu',0) == false)

retVal=false;

if (validateField('field_15','fieldBox_15','text',0) == false)

retVal=false;

if (validateField('field_16','fieldBox_16','website',0) == false)

retVal=false;

if (validateField('field_17','fieldBox_17','file',0) == false)

retVal=false;

if (validateField('field_18','fieldBox_18','textarea',0) == false)

retVal=false;

 

if(retVal == false)

{

alert('Please correct the errors.  Fields marked with an asterisk (*) are required');

return false;

}

return retVal;

}

//-->

</SCRIPT>

 

<!-- end page validaton -->

 

 

 

<!-- next page buttons --><li class="mainForm">

<label class="formFieldQuestion">

Type the following: <a class=info href=#><img src=imgs/tip_small.png border=0><span class=infobox>For security purposes, please type the letters in the image.</span></a><BR><img src="CaptchaSecurityImages.php" />

</label>

 

<input id="captchaForm" name="security_code" class="mainForm" type="text"/>

</li><li class="mainForm">

<input id="saveForm" class="mainForm" type="submit" value="Submit" />

</li>

 

</form>

<!-- end of form -->

<!-- close the display stuff for this page -->

</ul></div><div id="footer"><p class="footer"> </p>

</div>

 

</body>

</html>

Link to comment
Share on other sites

sorry. here ya go:

 

<?php

 

$where_form_is="http://".$_SERVER['SERVER_NAME'].strrev(strstr(strrev($_SERVER['PHP_SELF']),"/"));

 

session_start();

if( ($_SESSION['security_code']==$_POST['security_code']) && (!empty($_POST['security_code'])) ) {

// File upload handling

if($_FILES['field_17']['name']!=''){

$field_17_filename = "file_17_".date("sihdmY").substr($_FILES['field_17']['name'],strlen($_FILES['field_17']['name'])-4);

if(!move_uploaded_file($_FILES['field_17']['tmp_name'], "./files/".$field_17_filename)){

die("File " .  $_FILES['field_17']['name'] . " was not uploaded.");

}

}

 

include("config.inc.php");

$link = mysql_connect($db_host,$db_user,$db_pass);

if(!$link) die ('Could not connect to database: '.mysql_error());

mysql_select_db($db_name,$link);

$query = "INSERT into `".$db_table."` (field_1,field_2,field_3,field_4,field_5,field_6,field_7,field_8,field_9,field_10,field_11,field_12,field_13,field_14,field_15,field_16,field_17,field_18) VALUES ('" . $_POST['field_1'] . "','" . $_POST['field_2'] . "','" . $_POST['field_3'] . "','" . $_POST['field_4'] . "','" . $_POST['field_5'] . "','" . $_POST['field_6'] . "','" . $_POST['field_7'] . "','" . $_POST['field_8'] . "','" . $_POST['field_9'] . "','" . $_POST['field_10'] . "','" . $_POST['field_11'] . "','" . $_POST['field_12'] . "','" . $_POST['field_13'] . "','" . $_POST['field_14'] . "','" . $_POST['field_15'] . "','" . $_POST['field_16'] . "','" . $_POST['field_17'] . "','" . $_POST['field_18'] . "')";

mysql_query($query);

mysql_close($link);

 

mail("ecallahan@gmail.com","Tuff-N-Uff Fighter Registration from " . $_POST['field_1'] . "  " . $_POST['field_2'] . "","Form data:

 

First Name: " . $_POST['field_1'] . "

Last Name: " . $_POST['field_2'] . "

Nick Name: " . $_POST['field_3'] . "

Date of Birth: " . $_POST['field_4'] . "

E-mail Address: " . $_POST['field_5'] . "

Telephone: " . $_POST['field_6'] . "

City: " . $_POST['field_7'] . "

State: " . $_POST['field_8'] . "

Current Status: " . $_POST['field_9'] . "

Amateur Fight Record: " . $_POST['field_10'] . "

Professional Fight Record: " . $_POST['field_11'] . "

Have you held any titles: " . $_POST['field_12'] . "

Fight Weight: " . $_POST['field_13'] . "

Fight Style: " . $_POST['field_14'] . "

Team or Affiliation: " . $_POST['field_15'] . "

Website or Myspace: " . $_POST['field_16'] . "

Your Picture: ".$where_form_is."files/".$field_17_filename." (original file name: " . $_FILES['field_17']['name'] . ")

Additional Notes or Comments: " . $_POST['field_18'] . "

 

 

 

");

 

include("confirm.html");

}

else {

echo "Invalid Captcha String.";

}

 

?>

Link to comment
Share on other sites

mail("ecallahan@gmail.com","Tuff-N-Uff Fighter Registration from " . $_POST['field_1'] . "  " . $_POST['field_2'] . "","Form data:

First Name: " . $_POST['field_1'] . "
Last Name: " . $_POST['field_2'] . "
Nick Name: " . $_POST['field_3'] . "
Date of Birth: " . $_POST['field_4'] . "
E-mail Address: " . $_POST['field_5'] . "
Telephone: " . $_POST['field_6'] . "
City: " . $_POST['field_7'] . "
State: " . $_POST['field_8'] . "
Current Status: " . $_POST['field_9'] . "
Amateur Fight Record: " . $_POST['field_10'] . "
Professional Fight Record: " . $_POST['field_11'] . "
Have you held any titles: " . $_POST['field_12'] . "
Fight Weight: " . $_POST['field_13'] . "
Fight Style: " . $_POST['field_14'] . "
Team or Affiliation: " . $_POST['field_15'] . "
Website or Myspace: " . $_POST['field_16'] . "
Your Picture: ".$where_form_is."files/".$field_17_filename." (original file name: " . $_FILES['field_17']['name'] . ")
Additional Notes or Comments: " . $_POST['field_18'] . "



", "From: YOUR NAME <YOUREMAIL@YOURDOMAIN.COM>");

 

Look at the last line :)

Link to comment
Share on other sites

That's what a FROM: header does.

 

Yes, I know. But some hosts (including mine) require that the address used in the from header be an existing address. Its spam prevention. I wish all of them did that to tell the truth, it would probably cut down on a lot of the spam out there.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.