Hi,
I am trying to blind copy a send to a friend page to an email just so they can check if its being abused for spam etc. I have added my code below any help would be greatly appreciated.
Code:<form method="post" action=""> <div style="width:170px;border:1px solid #d1d4d1;background-color:#dadada;font:11px tahoma;color:#000000; text-align:center;"> <span style="text-align:center;"><b>Send this page To a friend</b></span> <div style="text-align:center;color:#CC0000;"> <?php if(isset($_POST['submit'])) { if($_POST['name1']=='') { echo "Name is empty"; } elseif($_POST['email1']=='') { echo "Email is empty"; } else { $name1= strip_tags($_POST['name1']); $url='http://www.celebcars.co.uk'.$_SERVER['PHP_SELF']; $to = $_POST['email1']; $subject = "{$name1} Thought You Might be Interested in These..."; $txt = '<div style="font-family:arial,sans-serif;font-size: 14px;" > Hi there<br /><br /> '.$name1.' thinks you may be interested in our Wedding cars so check us out at <a href="http://www.celebcars.co.uk" >www.celebcars.co.uk</a><br /><br /> Sent from '.$name1.' via Celebrations Wedding Cars website.<br /><br /> Celebrations Wedding Cars, Manchester<br /> 07971 144 443<br /><br /> <a href="mailto:enquiries@celebcars.co.uk" >enquiries@celebcars.co.uk</a><br /><br /> <a href="http://www.celebcars.co.uk" >www.celebcars.co.uk</a><br /> <br /> <img src="http://www.gibsonpixeldev.com/celeb-v5/images/image003.jpg" alt="" /> <br /> <ul> <li style="height: 30px;line-height: 30px; " >Convenient viewing times</li> <li style="height: 30px;line-height: 30px;" >Late availability</li> <li style="height: 30px;line-height: 30px;" >Discounted packages</li> <li style="height: 30px;line-height: 30px;" >Reliable, friendly and courteous service</li> </ul> </div>'; $headers = "MIME-Version: 1.0" . "\r\n"; $headers .= "Content-type:text/html;charset=iso-8859-1" . "\r\n"; $headers .= "From: enquiries@celebcars.co.uk"; if(mail($to,$subject,$txt,$headers)) { echo "<span id=\"mail_friend_send\" >Mail sent successfully</span>"; echo '<script type="text/javascript">setTimeout( "document.getElementById(\'mail_friend_send\').style.display = \'none\';", 3*1000 );</script>'; } } } ?> </div> <div style="text-align:left;text-indent:4px;"> Your Name </div> <div> <input name="name1" id="name1" type="text" value=""/> </div> <div style="text-align:left;text-indent:4px;"> Friends Email </div> <div> <input name="email1" id="email1" type="text" value=""/> </div> <div style="padding-top: 5px;color:#990033;"><input type="submit" name="submit" value="Send" /> </div> <div style="height:5px;"> </div> </div> </form>





Bookmarks