- see footer for list info -<
Pete Dray wrote:
- see footer for list info -<
I know this is primary school stuff but.....
I can't remember how to take text from a textarea, pop it into a database and then output it into a cfmail tag (text only) and still keep the line breaks etc.
I have just found out I'm not getting paid 'till after
Christmas so please, no insults.
form.cfm <form name="junk" action="action.cfm" method="post"> <textarea name="textstuff"></textarea>
action.cfm
<cfquery name="inserttext" datasource="mydsn">
INSERT INTO texttable (textfield)
VALUES ('#form.textstuff#')
</cfquery>
</form><cfmail type="text" otherattributes="here"> #form.textstuff# </cfmail>
<cflocation url="display.cfm">
display.cfm <cfquery name="outputstuff" datasource="mydsn"> SELECT textfield FROM texttable WHERE tableid = (Select max(tableid) FROM texttable) </cfquery>
<cfoutput query="outputstuff"> #replace(outputstuff.textfield,chr(13)&chr(10),"<br>","ALL")# </cfoutput>
Very rough, but I don't think there is anything missing. You may have to tinker with the replace to catch the CRLF/CR/LF - depending on which OS entered the text.
Any typos I blame on my cat who decided halfway through me typing this that I was the warmest place in the house and I should keep him warm too.
Regards
Stephen
_______________________________________________
For details on ALL mailing lists and for joining or leaving lists, go to http://list.cfdeveloper.co.uk/mailman/listinfo
-- CFDeveloper Sponsors:-
- Hosting provided by www.cfmxhosting.co.uk -< - Forum provided by www.fusetalk.com -< - DHTML Menus provided by www.APYCOM.com -< - Lists hosted by www.Gradwell.com -< - CFdeveloper is run by Russ Michaels, feel free to volunteer your help -<
