dc_jt Posted November 2, 2006 Share Posted November 2, 2006 HiI have a form which when submitted is emailed to a certain email address. However I would like to attach the image which is submitted from the user to the email but havent got a clue how. Anyone know how i put it into my email code?Thanks[code]if(sizeof($_REQUEST[errors])<1) { //if no errors then execute application $oReaders = new RCLTblReaders(); if (!$oReaders->AddReader($_POST)) { $_REQUEST['errors']['db'] = 'Please check your details again</div>'; } $_REQUEST[mode]="complete"; $name=$_REQUEST['name']; $email=$_REQUEST['email']; $address=$_REQUEST['address1']; $town=$_REQUEST['town']; $city=$_REQUEST['city']; $postcode=$_REQUEST['postcode']; $country=$_REQUEST['country']; $license=$_REQUEST['license']; $memory=$_REQUEST['memory']; $photo=$_REQUEST['photo']; $datap=$_REQUEST['datap']; $to = "***@***.com"; $subject = "Readers Archive"; $message = 'Name: ' .$name."\n". 'Email: '.$email."\n". 'Address: '.$address."\n". 'Town: '.$town."\n". 'City: '.$city."\n".'Postcode:'.$postcode."\n".'Country: '.$country."\n".'Photo:'.$photo; $from = 'From: ***@***.com'; mail($to, $subject, $message, $from); mail("***@***.com", $subject, $message, $from); } }?><?php if ($_REQUEST['mode'] == 'complete') { echo 'Thank You for submitting your details.'; } else { ?> <? if($_REQUEST[errors]){ ?> <ul> <? foreach($_REQUEST[errors] as $error){echo $error;} ?>[/code] Link to comment https://forums.phpfreaks.com/topic/25910-attaching-an-image-from-database-to-email/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.