Hey guys i have run into a php/html problem.
i am trying to make a program that can open the code of a file into a text area box.
i have tried an failed at a few different attempts to make this, so what would be the best way to go about this?
the purpose is to present the code in the box so that it can be edited.
why do i need to know how to do this? ask my teacher, lol
just to let you know she said we could use online forums, including yahoo answers.
thanks for any help!

jais-
i don't quite understand what u are saying. here is my code-
how can i incorporate your idea into this?
thanks
<html>
<head></head>
<body>
<h2>Get er done</h2>
<?php
///by James Lat
if (!isset($_POST['submit'])){
?>
<form action = "<?php echo $SERVER['PHP_SELF']; ?>" method="post">
Load you file: <input name="myfile" size="10">
<input type="submit" name="submit" value="Load">
</form>
<form method="post">
<textarea cols="50" rows="4" name="myfile">
<?php
}
else{
$myfile=$_POST['myfile'];
include("$myfile");
}
?>
</textarea>
</form>
</body>
</html>
i am trying to make a program that can open the code of a file into a text area box.
i have tried an failed at a few different attempts to make this, so what would be the best way to go about this?
the purpose is to present the code in the box so that it can be edited.
why do i need to know how to do this? ask my teacher, lol
just to let you know she said we could use online forums, including yahoo answers.
thanks for any help!
jais-
i don't quite understand what u are saying. here is my code-
how can i incorporate your idea into this?
thanks
<html>
<head></head>
<body>
<h2>Get er done</h2>
<?php
///by James Lat
if (!isset($_POST['submit'])){
?>
<form action = "<?php echo $SERVER['PHP_SELF']; ?>" method="post">
Load you file: <input name="myfile" size="10">
<input type="submit" name="submit" value="Load">
</form>
<form method="post">
<textarea cols="50" rows="4" name="myfile">
<?php
}
else{
$myfile=$_POST['myfile'];
include("$myfile");
}
?>
</textarea>
</form>
</body>
</html>