QUOTE(aj32 @ 3 Feb, 2008 - 12:22 PM)

QUOTE(Mike007 @ 3 Feb, 2008 - 02:18 PM)

You mean output the values you read to HTML and make it show as a text box?
something like this maybe?
CODE
echo "<input name=\"textbox1\" type=\"text\" value=\"$data\">";
Well, I already have the textboxes there, I just need to set the value of the text boxes after reading the file.
thanx
The way I see it you have 3 options to do that, although i'm not quite sure why create HTML first and then read the file in PHP, it would make more sense the other way.
But if you don't want to echo the all html thing you can echo only the data like this:
CODE
<input name="textbox1" type="text" value="<?php echo $data; ?>">
That works fine but you have to have your PHP code before that HTML line for it to work.
Another option would be to use javascript to fill those text boxes, and giving the javascript code the data it needs from php, something like
CODE
<script language="JavaScript>
<!--
document.getElementById("textbox1").value = <?php echo $data; ?>;
-->
</script>
And the last one, my favoriate

, use smarty template engine (or some other). So that you won't have to worry about HTML at all in your PHP pages, you will just output data to the template and then place it anywhere you want in the template.
http://www.smarty.netHope that helps.