help with text editing program

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
jameslat
Forum Newbie
Posts: 7
Joined: Fri Feb 26, 2010 5:08 pm

help with text editing program

Post by jameslat »

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>
User avatar
requinix
Spammer :|
Posts: 6617
Joined: Wed Oct 15, 2008 2:35 am
Location: WA, USA

Re: help with text editing program

Post by requinix »

That's all mostly JavaScript work. Hardly any PHP involved.
Post Reply