i'm reading a text file into a php page in a content management system using fgets, but i want people to be able to use html and php code in the text file.
at the moment the php variable are not enterpretted at all.
heres my code:
Code: Select all
<?php
$handle = @fopen("contentfiles/forgotpw_thanks.txt", "r");
if ($handle) {
while (!feof($handle)) {
$buffer = fgets($handle, 4096);
echo $buffer . "<br>";
}
fclose($handle);
}
?>Code: Select all
<br>An email has been sent to <b><?php echo $email; ?></b>.any help appreciated.
vauneen