Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New to the CF scene
    Join Date
    Jun 2010
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Help With Showing Rendered html in Textarea

    Hi All


    I have just searched the net trying to find the answer to a small question and haven't actually been able to find a solution, so I am hoping some knowledgeable person here may be able to help

    I own sites that have a built in admin mass mailer which sends emails out to the sites members via the admin panel.

    The mailer page is in php and is set up with textarea boxes/forms.

    I would like to be able to send out rendered html in the emails

    At the moment if I added this to the email (for example)

    Code:
    <a href="http://www.google.com">Google</a>
    It would show up in the received email in code format and not as a link.

    I would like to make the code html render so that it doesn't show as the code format.


    The code that creates the email content box is:

    Code:
    <tr>
    <td colspan=2 align=\"left\"><textarea cols=50 rows=13 name=\"msg\"></textarea></td>
    </tr>
    and the mailer page looks like:




    I hope that makes sense and apologies if I used an incorrect terminology I am relatively new to php/html

    I look forward to any help or suggestions you may have.

    Many Thanks

    Holly

  • #2
    Senior Coder
    Join Date
    Feb 2009
    Location
    Ilkley, West Yorkshire, UK
    Posts
    2,950
    Thanks
    9
    Thanked 724 Times in 718 Posts
    It's the php code you need to change to allow you to send an html email.

    Have a look at example 4 here or Google php html email for loads of help.

  • #3
    New to the CF scene
    Join Date
    Jun 2010
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by SB65 View Post
    It's the php code you need to change to allow you to send an html email.

    Have a look at example 4 here or Google php html email for loads of help.
    Hi thanks for your reply

    Sorry thats all a bit confusing to me

    So I can't just modify the <textarea> tag to a tag that allows html to be added and rendered?

    The mailer system is built into the site script so other than the php file that contains the layout code I wouldn't have a clue what to modify, sorry if I am asking stupid questions

  • #4
    Regular Coder
    Join Date
    Aug 2005
    Location
    MS
    Posts
    829
    Thanks
    10
    Thanked 79 Times in 77 Posts
    To put HTML code inside a textarea box, you need to change the opening tag "<" to the character entity. It will show the code as text, but will not be any active links, etc., inside the textarea box.

    < = & lt ; (remove spaces)

    Not sure if that is what you are after. If you want a better email form, may I suggest one of these:

    Your current hosting package MUST allow SMTP ( http://en.wikipedia.org/wiki/Simple_...nsfer_Protocol ) to work. Otherwise, no email can be sent.

    Use any of the below sites to make the workable form you need:

    For making forms:

    These are really good online form makers. Just follow the instructions for making it and uploading file(s).

    Contact Form Generator: http://www.tele-pro.co.uk/scripts/contact_form/
    http://www.jotform.com/?gclid=CNKhqe...FRQhnAod6laUqA (WYSIWYG Form Maker)
    http://www.thesitewizard.com/wizards/feedbackform.shtml
    Ajax - Creating an HTML Form: http://www.tizag.com/ajaxTutorial/ajaxform.php
    http://www.phpform.org/

    http://www.thepcmanwebsite.com/form_mail.shtml
    http://emailmeform.com/
    http://www.freecontactform.com/
    http://www.reconn.us/content/view/12/34/ (Download - Contact Us Script)
    http://formsmarts.com/

    http://apptools.com/phptools/forms/forms1.php
    Form Service: http://www.mycontactform.com/
    Online Free Tool, PHP Contact Form Code Generator: http://www.htmlbasix.com/contactform.shtml
    PHP Mailer Script Step by Step: http://www.htmlgoodies.com/beyond/ph...le.php/3855686
    PHP Sending E-mails: http://www.w3schools.com/PHP/php_mail.asp

    Freebie: Good looking Fluid Contact Form: http://www.flashuser.net/flash-compo...tact-form.html

    Put an online contact form on your site in about 8 minutes (Requires an account): http://response-o-matic.com/
    Last edited by Major Payne; 06-27-2010 at 06:27 AM.
    ☠ ☠RON☠ ☠


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •