sandbudd Posted March 20, 2008 Share Posted March 20, 2008 <?php error_reporting(0); session_start(); $Domain="http://".$_SERVER['HTTP_HOST']; $fname=$_POST['fname']; $company=$_POST['company']; $address=$_POST['address']; $city=$_POST['city']; $zip=$_POST['zip']; $email=$_POST['email']; $phone=$_POST['phone']; $fax=$_POST['fax']; $type2=$_POST['type2']; $type3=$_POST['type_III']; $comment=$_POST['comment']; $cdir="contactupload"; $save_path="uploads/"; $date = date("F j, Y, g:i a"); $file = $_FILES['userfile']; $k = count($file['name']); for($i=0;$i< $k ;$i++) { if(isset($save_path) && $save_path!="") { $random_digit=rand(0000,9999999); $name = split('/',$file['name'][$i]); $name = str_replace("\\","",$name); $name = str_replace("'","",$name); $name = str_replace("","_",$name); $name = str_replace(" ","_",$name); $name = str_replace(".",$random_digit.".",$name); if(move_uploaded_file($file['tmp_name'][$i], $save_path . $name[count($name)-1])) { //// download the file///// $finalfile.="<li><a href='".$Domain."/".$cdir."/download.php?f=".$name[count($name)-1]."'>".$name[count($name)-1]."</a></li>"; $list_files.="<li>".$name[count($name)-1]."</li>"; } } } ///message in the mail////// $msg="-- This is the Customer's information -- <br>Full Name: $fname <br>Company: $company <br>Address: $address <br>City: $city <br>Zip: $zip <br>Email: <a href='mailto:$email'>$email<a> <br>Phone Number: $phone <br>Fax Number: $fax <br>Process Requested <br>$type2 <br>$type_III <br><br>Comments: $comment <br><br>Attached files: $finalfile"; $msg2=" <br>----------------------------------------------------- <br> <br>-- Clients information Submitted $date --<br> <br>Full Name: $fname <br>Company: $company <br>Address: $address <br>City: $city <br>Zip: $zip <br>Email Address: <a href='mailto:$email'>$email<a> <br>Phone Number: $phone <br>Fax Number: $fax <br>Process Requested <br>$type2 <br>$type_III <br>Comments: $comment <br><br>Attached files: <br>$finalfile <br>"; ///email address//// $to = "[email protected]"; ///Subject Title $subject="New Message"; //mail Function////// mail($to,$subject,$msg,"From: $email\n" . "MIME-Version: 1.0\n" . "Content-type: text/html; charset=iso-8859-1"); $fh = fopen("email.php", "a"); fwrite($fh, $msg2); fclose($fh); ?> Link to comment https://forums.phpfreaks.com/topic/97160-check-box-sending-to-email-showing-checked/ Share on other sites More sharing options...
RottNKorpse Posted March 20, 2008 Share Posted March 20, 2008 I'm not interested in looking at the code to find the flaw straight up so please provide errors or what is happening when using that code? Link to comment https://forums.phpfreaks.com/topic/97160-check-box-sending-to-email-showing-checked/#findComment-497162 Share on other sites More sharing options...
sandbudd Posted March 20, 2008 Author Share Posted March 20, 2008 Im not getting an error message...what I am trying to accomplish is having it show up in the email as checked? I hope that I am explaining ths right Link to comment https://forums.phpfreaks.com/topic/97160-check-box-sending-to-email-showing-checked/#findComment-497164 Share on other sites More sharing options...
RottNKorpse Posted March 20, 2008 Share Posted March 20, 2008 Well I dont know what you mean by "as checked"... I do have two questions though, (1) Why is the code calling to alter a php file, if you just want it to email someone why is it writing to a file? (2) Did you write this script or did someone give it to your or did this come include with some other type of script such as a CMS? Link to comment https://forums.phpfreaks.com/topic/97160-check-box-sending-to-email-showing-checked/#findComment-497170 Share on other sites More sharing options...
sandbudd Posted March 20, 2008 Author Share Posted March 20, 2008 it is a combination of putting different scripts together I have gathered and some wrote.... It is writing to another file to save the email on the server.... Link to comment https://forums.phpfreaks.com/topic/97160-check-box-sending-to-email-showing-checked/#findComment-497177 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.