473,386 Members | 2,114 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

simple text editor

Can anyone tell me how I can open a file for editing in a textarea and save
with the changes as they are in the textarea. Do I need javascript for this
too, how does php know where to insert the cursor/data. Thanks for your
help.
Jul 17 '05 #1
1 2245
Carved in mystic runes upon the very living rock, the last words of Dave
of comp.lang.php make plain:
Can anyone tell me how I can open a file for editing in a textarea
<?php $thefile = file_get_contents('myfile.txt');?>

<TEXTAREA NAME="TheFile"><?php =$thefile?></TEXTAREA>
save with the changes as they are in the textarea.


http://www.php.net/fopen
http://www.php.net/fputs

--
Alan Little
Phorm PHP Form Processor
http://www.phorm.com/
Jul 17 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: stephenlee | last post by:
I want to develop a simple Python program to edit source code that is persisted in a database (memo fields). The code to be edited is iHTML and SQL and I want syntax colouring and good basic...
4
by: Michele Petrazzo | last post by:
I want to create a simple image editor (with wxPython) for my application. Now I'm able to zoom, draw with a pen, insert a text into the loaded image, and undo changes (for this I reload the image...
4
by: Jonathan Fine | last post by:
Hi I'm looking for a simple Python + Tk text editor. I want it as a building block/starting point. I need basic functions only: open a file, save a file, new file etc. It has to be open...
13
by: LRW | last post by:
Having a problem getting a onSubmit function to work, to where it popsup a confirmation depending on which radiobutton is selected. Here's what I have: function checkdel() { if...
0
by: Tal Sharfi | last post by:
Hi everyone I recently had the need for StringGrid object same as the one that Delphi has. An object that helps show lists of other objects in a simple grid. I searched the news groups and...
7
by: Michael Peters | last post by:
I need a simple editor to edit the texts in static html pages. Is there a program for that? It should be something very simple, nothing like Dreamweaver. I don't need to edit any tables,...
1
by: Arjen | last post by:
Hi, Im trying to make / looking for a very very simple WYSIWYG editor. Ive made a (ad free) site about dogs but it's attracting way more visitors then I could ever have imagined. I have a forum...
10
by: John Baima | last post by:
Okay, so I know that there is probably not a "simple" XML editor, but I would like something fairly lightweight that I can buy for someone else so that they can edit an XML text that I've created...
0
by: karen987 | last post by:
Could someone please tell me what code to add here? I have a weblog, with daily news which readers can add comments to, which are stored in a database. The form to add the comments is on an ASP page,...
1
by: Victor | last post by:
Hi guys I have a small question abou the vs2005's text editor. in my text editor, any space or tabs become little dot. i forget what shortcut i pressed.It looks not right to me at all. Can anyone...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.