Reply to Re: How to echo content of a file?

Your name:

Reply:


Posted by Ken Robinson on 11/27/21 11:25

<talthen.z-serwera.o2@nospam.pl> wrote in
news:df52e5$m6q$1@atlantis.news.tpi.pl (in part):

> Hello,
> I have a file that looks like this:
> =========
> <td valign='top'>Data</td>
> <td><input type='text' name='Data' value="$_REQUEST['Data']"
> size='50'> </td>
> =========
> I would like to include this in my script, but I want the $_REQUEST to
> be automatically filled.
> When I do:
> include 'file';
> I have this printed to output AS-IS.

That's because your file is HTML, not PHP. Do something like the
following as the include file:

<?
echo '<td valign="top">Data</td>'."\n";
echo '<td><input type="text" name="Data" value="' . $_REQUEST['Data'] .
'" size="50"> </td>' , "\n";
?>

Or

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

Ken

[Back to original 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

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