|
Posted by =?iso-8859-1?Q?=C1lvaro?= G. V on August 1, 2008, 12:09 pm
Please log in for more thread options
*** someusernamehere escribió/wrote (Fri, 1 Aug 2008 09:03:15 -0700 (PDT)):
show/hide quoted text
> $foo = <<<bar
> ............................................................................
> HTML code here..............................................
> .....................................................................
> $lang = mysql_query("SELECT * FROM lang where selected != '*'");
> ...................................................................
> more PHP consults to mysql here
> ......................................................
> bar;
show/hide quoted text
> The question is how to escape the php code for display into HTML, what I
> have done is comment it with <!-- and --> this works, but if I see the
> page source code I can see all the php code commented here, and
> obviously is insecure for the system, anyone know what to do?
Heredoc syntax is similar to double quotes: you get variables replaced with
their values, but that's all. You can't put PHP code inside.
--
-- http://alvaro.es - Álvaro G. Vicario - Burgos, Spain
-- Mi sitio sobre programación web: http://bits.demogracia.com -- Mi web de humor en cubitos: http://www.demogracia.com --
|