Formatting form input text

  • Maverick(AVA)
  • Novice
  • Novice
  • User avatar
  • Posts: 18
  • Loc: In your basement...

Post 3+ Months Ago

Hey, I've got a ? I've been looking everywhere for resources on how to do this but I'm not getting what I'm looking for. Here's the problem:

I've got input text form data that needs to be formatted before it is dumped into a mysql dbase. Simple crap like recognizing line breaks, new paragraphs etc.

Is there a way I can code this to happen in html or does it have to be done with a script of some kind?

Thanks for any help!
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • rtm223
  • Mastermind
  • Mastermind
  • User avatar
  • Posts: 1855
  • Loc: Uk

Post 3+ Months Ago

assuming you are using php
http://us4.php.net/manual/en/function.nl2br.php

should help. However you may need to write a function to detect the ascii chars 13 and/or 10 into <br> or preferably <br />

New para in a block of text is equivalent to <br /><br /> unless yo intent to do any funky css formatting
  • Maverick(AVA)
  • Novice
  • Novice
  • User avatar
  • Posts: 18
  • Loc: In your basement...

Post 3+ Months Ago

Thanks! I'll check out those resources

Post Information

  • Total Posts in this topic: 3 posts
  • Users browsing this forum: No registered users and 68 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.