help with text editing program
Posted: Fri Feb 26, 2010 5:19 pm
hey guys i am trying to make a simple program to help me update my website.
right so, after i am done with programing it, it should be able to do the following:
btw i'm not even sure php can do this that kinda why i'm poting it on a forum.
1. upload the file.txt and display it on the page (easy)
2. add proper php so that whenever i high-ligh text i can right click it and have a few options
3. one of these options will be to edit the text ( i think this would best be done by making the php search the external .txt file)
4.also have another "option" to insert paragraphs, headers, breaks, etc.
what i mainly need help with is number 2.
thanks for any help!
-James Lat
(here is my existing code)
<html>
<head></head>
<body>
<h2>Get er done</h2>
<?php
///This program is to make updating website text easier
if (!isset($_POST['submit'])){
?>
<form action = "<?php echo $SERVER['PHP_SELF']; ?>" method="post">
Upload you .txt file: <input name="myfile" size="10">
<input type="submit" name="submit" value="Upload">
</form>
<?php
}
else{
$myfile=$_POST['myfile'];
include("$myfile");
}
?>
</body>
</html>
right so, after i am done with programing it, it should be able to do the following:
btw i'm not even sure php can do this that kinda why i'm poting it on a forum.
1. upload the file.txt and display it on the page (easy)
2. add proper php so that whenever i high-ligh text i can right click it and have a few options
3. one of these options will be to edit the text ( i think this would best be done by making the php search the external .txt file)
4.also have another "option" to insert paragraphs, headers, breaks, etc.
what i mainly need help with is number 2.
thanks for any help!
-James Lat
(here is my existing code)
<html>
<head></head>
<body>
<h2>Get er done</h2>
<?php
///This program is to make updating website text easier
if (!isset($_POST['submit'])){
?>
<form action = "<?php echo $SERVER['PHP_SELF']; ?>" method="post">
Upload you .txt file: <input name="myfile" size="10">
<input type="submit" name="submit" value="Upload">
</form>
<?php
}
else{
$myfile=$_POST['myfile'];
include("$myfile");
}
?>
</body>
</html>