milkboy31 Posted October 22, 2012 Share Posted October 22, 2012 (edited) Hi all, I'm modding a plug-in for an auction site and when you win it sends an email to you with payment info. The link to our paypal payment is showing up as plain text and not as a link... so I figured I'd go in and make the code use an href instead of plain text only... but the context/language is beyond my skill set. When I modified it, it threw syntax errors. So here's the body of the email it sends: $body = "Congratulations! You have just won the following auction on {site_name}."; $body .= "\n\nAuction: {auction_name} for {current_price}"; $body .= "\n\nLink: {auction_link}"; $body .= "\n\n--------------------------------------------\n"; $body .= "{payment_details}"; $body .= "\n\nShould you require any further assistance, please contact me at {contact_email}."; $body .= "\n\n--------------------------------------------\n"; Where it says {payment_details} it puts in the following: case "paypal": $payment = "\n\nYou can pay for the auction by clicking on the link below:"; $payment .= "\n\nhttps://www.paypal.com/cgi-bin/webscr?cmd=_xclick&business=".urlencode($paypal)."&item_name=".urlencode($rows->name)."&amount=".urlencode($rows->winning_price)."&shipping=".urlencode($rows->shipping_price)."&no_shipping=0&no_note=1¤cy_code=".$currencycode."&lc=GB&bn=PP%2dBuyNowBF&charset=UTF%2d8"; break; How can I make that sencond $payement line be an html link and not just text? Wrapping it in <a href="all that url">all that url</a> breaks it since php can't have slashes in it like that...and the double quotes mess with it... I'm just out of my skill set here. Any help is appreciated. Thanks. Edited October 22, 2012 by milkboy31 Quote Link to comment https://forums.phpfreaks.com/topic/269780-help-needed-emailing-a-clickable-link-vs-plain-text-via-php/ Share on other sites More sharing options...
milkboy31 Posted October 22, 2012 Author Share Posted October 22, 2012 Figured it out... case "paypal": $payment = "\n\nYou can pay for the auction by clicking on the link below:"; $paymentURL = "https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&business=".urlencode($paypal)."&item_name=".urlencode($rows->name)."&amount=".urlencode($rows->winning_price)."&shipping=".urlencode($rows->shipping_price)."&no_shipping=0&no_note=1¤cy_code=".$currencycode."&lc=GB&bn=PP%2dBuyNowBF&charset=UTF%2d8"; $payment .= "\n\n<a href='".$paymentURL."'>Pay Now</a>"; break; That did it. Quote Link to comment https://forums.phpfreaks.com/topic/269780-help-needed-emailing-a-clickable-link-vs-plain-text-via-php/#findComment-1386996 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.