You are here: Re: How to echo content of a file? « PHP Language « IT news, forums, messages
Re: How to echo content of a file?

Posted by Hilarion on 11/20/61 11:25

>> Do something like the
>> following as the include file:
>>
>> <td valign="top">Data</td>
>> <td><input type="text" name="Data" value="<? echo $_REQUEST['Data'] ?>"
>> size="50"> </td>
>
> But is there a way to treat HTML file like PHP one? :>


If you do "include" (or "include_once" or "require") then any file included
this way is treated as PHP file, so if the file looks like Ken described it
(my modification which works also if short tags are turned off and
if $_REQUEST['Data'] contains double quotes or any other HTML special chars):

<td valign="top">Data</td>
<td><input type="text" name="Data"
value="<?php echo htmlspecialchars( $_REQUEST['Data'] ); ?>" size="50"></td>


then this should work as you wanted.



Hilarion

 

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

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