Hi, I want to add file attechment to this scrip can any one help me !!!!
<?php
/*
Created: 2004/12/06
Updated: ----/--/--
- Envía emails a los dominios indicados en este archivo con los datos pasados
*/
/* SETUP VARIABLES */
# Añade cuantos como quieras...
$Destination[] = 'messaging.nextel.com';
$Destination[] = 'messaging.boostmobile.com';
$Destination[] = 'messaging.sprintpcs.com';
$Destination[] = 'vtext.com';
#...
$MessageSignature = "\n Service By Nextel28.com"; # la \n es un salto de línea...
$PageToGoWhenSent = 'sent.htm';
/* END SETUP VARIABLES */
//error_reporting('E_ALL');
error_reporting(0);
# Si se han pasado todos los datos en el formulario inicia el envío...
if ( !empty($_POST['to'])
and !empty($_POST['from'])
and !empty($_POST['subject'])
and !empty($_POST['message']))
{
# Envía un email por cada servidor configurado...
foreach ($Destination as $server)
{
mail($_POST['to'].'@'.$server, $_POST['subject'], $_POST['message'].$MessageSignature,
'From: '.$_POST['from']);
}
# Redirecciona a la página indicada...
header('Location: '.$PageToGoWhenSent);
}
?>
<script language="JavaScript" src="check-form.js" type="text/JavaScript"></script>
<style type="text/css">
<!--
td {
text-align: left;
vertical-align: top;
font-family:Tahoma;
font-size:11px;
color:#6B6B6B;
}
a {
text-decoration: none;
}
a.1 {
text-decoration: none;
color: 000000;
}
.t11 {
font-family: Tahoma;
font-size: 11px;
font-style: normal;
}
body {margin:0px;padding:0px}
.style1 {color: #1996ca}
.style2 {color: #6B6B6B}
-->
</style>
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_swapImgRestore() { //v3.0
var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}
function MM_preloadImages() { //v3.0
var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}
function MM_findObj(n, d) { //v4.01
var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
if(!x && d.getElementById) x=d.getElementById(n); return x;
}
function MM_swapImage() { //v3.0
var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
//-->
</script>
</HEAD>
<BODY BGCOLOR=#FFFFFF LEFTMARGIN=0 TOPMARGIN=0 MARGINWIDTH=0 MARGINHEIGHT=0 onLoad="MM_preloadImages('images/m2r.jpg','images/m3r.jpg','images/m4r.jpg','images/m5r.jpg','images/m6r.jpg','images/m7r.jpg')">
<!-- ImageReady Slices (01_main.psd - Slices: 01, 02, 03) -->
<body bgcolor="#111111">
<TABLE WIDTH=311 height="211" BORDER=0 CELLPADDING=0 CELLSPACING=0 align="center">
<TR>
<td width=311 height=211 alt="" valign="top">
<table width=311 border=0 cellpadding=0 cellspacing=0 height="1">
<tr>
<td height="15" bgcolor="#FF9900" width="341" style="border: 1px solid #FF9900; padding-left: 4; padding-right: 4; padding-top: 1; padding-bottom: 1">
<img border="0" src="../images/new_pa5.gif" width="67" height="23"><img border="0" src="../images/new_pa6.gif" width="86" height="23"><img border="0" src="../images/new_pa7.gif" width="85" height="23"><img border="0" src="../images/new_pa8.gif" width="73" height="24"></td>
<td width=10 height=1 valign="top" bordercolor="#CCCCCC" bgcolor="#CCCCCC" alt="" rowspan="3">
</tr>
<tr>
<td height="33" bgcolor="#FF9900" width="341" style="border: 1px solid #FF9900; padding-left: 4; padding-right: 4; padding-top: 1; padding-bottom: 1">
<form name="messaging" method="post" action="">
<!--webbot bot="SaveResults" u-file="form_results.csv" s-format="TEXT/CSV" s-label-fields="TRUE" startspan --><input TYPE="hidden" NAME="VTI-GROUP" VALUE="0"><!--webbot bot="SaveResults" endspan i-checksum="43374" --><input TYPE="hidden" NAME="VTI-GROUP" VALUE="0"><!--webbot bot="SaveResults" i-checksum="43374" endspan --><table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="112%" id="AutoNumber1">
<tr>
<td width="100%">
<p align="left">TO:</p>
</td>
</tr>
<tr>
<td width="100%">
<font color="#FFFFFF" size="4">
<input name="to" type="text" style="border:1px solid #000000; background-color: #000000; color:#FF9900" value="<?php echo $_POST['PhoneNumber']; ?>" size="10"></font></td>
</tr>
<tr>
<td width="100%">FROM:</td>
</tr>
<tr>
<td width="100%"><font color="#FFFFFF" size="4">
<input name="from" style="background-color: #000000; color:#FF9900" value="<?php echo $_POST['from']; ?>" onChange="checkMessageLength(this.form)" onKeyUp="checkMessageLength(this.form)" size="19"></font></td>
</tr>
<tr>
<td width="100%">SUBJECT:</td>
</tr>
<tr>
<td width="100%"><font color="#FFFFFF" size="4">
<input name="subject" style="background-color: #000000; color:#FF9900" value="<?php echo $_POST['subject']; ?>" onChange="checkMessageLength(this.form)" onKeyUp="checkMessageLength(this.form)" size="25"></font></td>
</tr>
<tr>
<td width="100%">MESSAGE:</td>
</tr>
<tr>
<td width="100%"><font size="4" color="#000000">
<textarea name="message" cols="36" rows="6" wrap="OFF" style="background-color: #000000; color:#FF9900" onChange="checkMessageLength(this.form)" onKeyUp="checkMessageLength(this.form)"><?php echo $_POST['message']; ?></textarea></font></td>
</tr>
<tr>
<td width="100%">
<p align="center"><font color="#FFFFFF" size="4">
<input name="button" type="button" onClick="SubmitForm()" value="Send Now" style="float: left"></font></td>
</tr>
</table>
</form>
</td>
</tr>
<tr>
<td height="1" bgcolor="#FF9900" width="341" style="border: 1px solid #FF9900; padding-left: 4; padding-right: 4; padding-top: 1; padding-bottom: 1"> </td>
</tr>
</table></td>
</table></TD>
</TR>
</TABLE>
<!-- End ImageReady Slices -->
</BODY>
</HTML>