Forum Moderators: coopster
<? $textarea = "test";?>
<p>Desc:<br /> <textarea cols="100" rows="20" name="content"><?echo $textarea;?></textarea></p>
Does your php set up allow for the short tag (<? vs <?php)?
Is there anything else before this that is not closed properly? Look at the source. Maybe check it in an html validator?
print '<form action="teachers.php" method="post">
<p>Directory: <input type="text" name="link" size="40" maxsize="100" value="' . $row['link'] . '"/></p>
<? $textarea = "test";?>
<p>Desc:<br /> <textarea cols="100" rows="20" name="content"><?echo $textarea;?></textarea></p>
<input type="hidden" name="id" value="' . $_GET['id'] . '" />
<input type="submit" name="submit" value="Update this Entry!" />
</form>';
<? $textarea = "test";?> and <?echo $textarea;?>
inside your actual print statement
try this chunk, I removed the print statement all together
<form action="teachers.php" method="post">
<p>Directory: <input type="text" name="link" size="40" maxsize="100" value="<?php echo $row['link'];?>"/></p>
<p>Desc:<br /> <textarea cols="100" rows="20" name="content"><?php echo $textarea;?></textarea></p>
<input type="hidden" name="id" value="<?php echo $_GET['id'];?>" />
<input type="submit" name="submit" value="Update this Entry!" />
</form>
you may have to drop out of php parsing to make this work.
precede it with a?> if so
have you tried testing the values to see what actually ends up in the vars?
$dir = $row['link'];
$mypath = "../../subjects/" . $dir . "/" . $filename . ".htm";
echo $mypath;
$textarea = file_get_contents($mypath);
I did that the concat way for mo reason in particular. Is that path correct?
You are looking for a file 2 dirs above the one you are in, then into the subjects dir and then into a dir to be determined and then there's the file?
That path won't port to other dirs at all, it will break or will need to be hard coded.