mariocesar Posted June 11, 2010 Share Posted June 11, 2010 This form is suppose to send 2 images and the user information, the information arrives but the images or their links are missing here is the code <?php if(isset($_REQUEST['button_submit'])) { if($_FILES['image']['name']!="") { $ProDes=isset($_POST['product_desc'])?$_POST['product_desc']:''; $QanReq=isset($_POST['quantity_request'])?$_POST['quantity_request']:''; $ShipInf=isset($_POST['ship_inform'])?$_POST['ship_inform']:''; $Title=isset($_POST['title'])?$_POST['title']:''; $FirstName=isset($_POST['first_name'])?$_POST['first_name']:''; $LastName=isset($_POST['last_name'])?$_POST['last_name']:''; $Email=isset($_POST['email'])?$_POST['email']:''; $ConEmail=isset($_POST['confirm_email'])?$_POST['confirm_email']:''; $Phone=isset($_POST['phone'])?$_POST['phone']:''; $Mobile=isset($_POST['mobile'])?$_POST['mobile']:''; $Company=isset($_POST['company'])?$_POST['company']:''; $Website=isset($_POST['website'])?$_POST['website']:''; $Add1=isset($_POST['address1'])?$_POST['address1']:''; $Add2=isset($_POST['address2'])?$_POST['address2']:''; $City=isset($_POST['city'])?$_POST['city']:''; $State=isset($_POST['state'])?$_POST['state']:''; $Zip=isset($_POST['zip'])?$_POST['zip']:''; $Country=isset($_POST['country'])?$_POST['country']:''; $FindUs=isset($_POST['find_us'])?$_POST['find_us']:''; if(file_exists("productimages/".$_FILES['image']['name'])) $msg="An image with this name already exsists . Please try with different image name for Product sample"; else if($_FILES['image']['type']=="image/jpeg" or $_FILES['image']['type']=="image/gif" or $_FILES['image']['type']=="image/png") { move_uploaded_file($_FILES['image']['tmp_name'],"productimages/".$_FILES['image']['name']); $img="yes"; $ImagePath='http://allstatedisplay.com/productimages/'.$_FILES['image']['name']; } else { $msg.="Product sample first image is not a valid image type. Please choose JPG,GIF or PNG type file only"; $img="No"; } } if($_FILES['image1']['name']!="") { if(file_exists("productimages/".$_FILES['image1']['name'])) $msg="An image with this name already exsists. Please try with different image name for drwaing , picture etc."; else if($_FILES['image1']['type']=="image/jpeg" or $_FILES['image1']['type']=="image/gif" or $_FILES['image1']['type']=="image/png") { move_uploaded_file($_FILES['image1']['tmp_name'],"productimages/".$_FILES['image1']['name']); $img1="yes"; $ImagePath1='http://allstatedisplay.com/productimages/'.$_FILES['image1']['name']; } else { $msg.="Product sample second image is not a valid image type. Please choose JPG,GIF or PNG type file only"; $img1="No"; } } $temp='<p>Description of product:'.$ProDes.'</p>'; if( $img=="yes") { $temp.='<p>Product Sample Image : </p><img src="'.$ImagePath.'" width="300"/>'."</p><p> If you are not seeing the image copy and paste the link below in your browser address to view the image: $ImagePath</p>"; } if($img1=="yes") { $temp.='<p>Attach file (Drawing, Picture etc.) </p><p><img src="'.$ImagePath1.'" width="300"/>'."</p><p> If you are not seeing the image copy and paste the link below in your browser address to view the image: $ImagePath1</p>"; } $temp.='<p>Quantity Requested:'.$QanReq.'</p><p>Shipping information:'.$ShipInf.'</p><p><strong>Contact Information:</strong></p><p>Title:'.$Title.'</p><p>Name:'.$FirstName.' '.$LastName.'</p><p>Email:'.$Email.'</p><p>Phone No:'.$Phone.'</p><p>Mobile:'.$Mobile.'</p><p>Company / Organization:'.$Company.'</p><p>Website:'.$Website.'</p><p>Address 1:'.$Add1.'</p><p>Address 2:'.$Add2.'</p><p>City / Town:'.$City.'</p><p>State / Province:'.$Zip.'</p><p>Zip/Postal code:'.$State.'</p><p>Country:'.$Country.'</p><p>How did you find us:'.$FindUs.'</p>'; $subject="ADS Product Request"; /* change this! */ $headers1 = 'MIME-Version: 1.0' . "\r\n"; $headers1 .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n"; $headers1 .= "From: ADS Product Request <www@ADS.com>" . "\r\n"; $headers = 'MIME-Version: 1.0' . "\r\n"; $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n"; //$headers .= 'Cc: niladri.debnath27@gmail.com' . "\r\n"; $headers .= "From: ADS Product Request <www@ADS.com>" . "\r\n"; mail('mariovicuna@yahoo.com', $subject, $temp,$headers1); $mode='success'; } ?> Quote Link to comment Share on other sites More sharing options...
kenrbnsn Posted June 11, 2010 Share Posted June 11, 2010 Please don't double post. You already asked this question at http://www.phpfreaks.com/forums/index.php/topic,300864.0.html Quote Link to comment Share on other sites More sharing options...
mariocesar Posted June 11, 2010 Author Share Posted June 11, 2010 sorry I think was the wrong forum. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.