You are here: Re: Problem combining validation and templates « PHP Programming Language « IT news, forums, messages
Re: Problem combining validation and templates

Posted by Toby A Inkster on 05/18/07 10:42

Phil Latio wrote:

> function getTextBox()
> {
> $line = "<input type=\"text\" ";
> $line.= "name=\"";
> $line.= $this->textboxName;
> $line.= "\" ";
> $line.= "class=\"";
> $line.= $this->style;
> $line.= "\" />";
> return $line;
> }

What's all this mess all over the place?!

function getTextBox ()
{
return sprintf('<input type="text" name="%s" class="%s" />',
htmlentities($this->textboxName),
htmlentities($this->style)
);
}

Go and tidy your room Phil!

--
Toby A Inkster BSc (Hons) ARCS
http://tobyinkster.co.uk/
Geek of ~ HTML/SQL/Perl/PHP/Python/Apache/Linux

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация