[GRLUG] PHP & <textarea>

L. V. Lammert lvl at omnitec.net
Mon Nov 14 19:33:26 EST 2011


On Mon, 14 Nov 2011, Nathan Phillip Brink wrote:

> I think that's because <textarea/>s are akin to <pre/>s. Your template
> has a newline, three spaces, a newline, and another space in addition
> to the data produced by the <?php ?> snippet.
>
Bingo - thanks!

> Another note, you're forgetting to escape the data you're pulling from
> the database. The template should probably look like:
>
> <div class="formLabel">Teams</div><div class="formElement">
>  <textarea rows="2" cols="30" name="event_title" id="event_title_game"><?php echo htmlentities(empty($event_title) ? "H: \n    A: \n" : $event_title); ?></textarea>
> </div>
>
Also excellent, .. one of these days I'm going to have to make a meeting!

	Lee

-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.



More information about the grlug mailing list