Hey guys, I assume there is a way to do this and it shouldnt be too difficult. I am just having a heck of time finding out how to do exactly this...
I have a flash file that is pulling text dynamically from a .txt file. I was wondering if how to make a form with a text area that will populate automatically from what is currently in the txt file. Then I could edit the data from there, submit it and it will all be updated.
I realize all of this could be done with a database but I will be doing more of these scenarios in the near future and thought this may be a lot quicker than setting up a database for each site.
So any help would be MORE than appreciated. Thank you!
4 11438
Hi,
Start by looking at this function. What you're describing can be done, it's just a matter of figuring out the most difficult way of doing it (no sh*t).
The link should get you started I hope, write back if you need more help...
MK
Hi,
Start by looking at this function. What you're describing can be done, it's just a matter of figuring out the most difficult way of doing it (no sh*t).
The link should get you started I hope, write back if you need more help...
MK
Awesome I got it working!
Form page.
[PHP]<form action="process script.php" method="post">
<textarea rows="25" cols="40" name="content">
<?php
$fn = "test.txt";
print htmlspecialchar s(implode("",fi le($fn)));
?>
</textarea>
<br>
<input type="submit" value="Change!" >
</form>[/PHP]
and script page:
[PHP]<?php
$fn = "test.txt";
$content = stripslashes($_ POST['content']);
$fp = fopen($fn,"w") or die ("Error opening file in write mode!");
fputs($fp,$cont ent);
fclose($fp) or die ("Error closing file!");
echo "<meta http-equiv=\"refresh \" content=\"0; url=form.php\" />\n";
?>[/PHP]
Thanks a ton for the help, I knew it was a no brainer and I was just being dumb.
Hey,
Don't call you self dumb think of it as obtaining knowledge.
MK
Hey,
Don't call you self dumb think of it as obtaining knowledge.
MK
NICE CALL on that one!
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: jajoo |
last post by:
Hi everyone,
I am trying to send files with multipart/form-date. Everything is ok
with the send.
But when I am receiving the files I should specify a directory where
the files to be saved. The problem is that Tomcat saves the files into
%CATALINA_HOME%/bin directory. I am wondering why? Why not into my
application directory?
The application directory is %CATALINA_HOME%/webapps/picture.
As a parameter of directory I am giving "." – which...
|
by: Randell D. |
last post by:
Whats wrong with my sample script below? All I want to do is confirm that
my form data is in my environment (basically, I'm writing a script that will
check that some form fields have a value, and others don't - The
functionality of this will be used in my other script but I want to make
sure I know whats happening first as opposed to bastardizing someone else's
work).
I have worked some of the code out - I figured the what should be...
|
by: Nik Coughin |
last post by:
Is there a simple way of opening a text file from a server, and reading from
it line by line?
IE
http://someserver/file.txt contains a couple of hundred lines. Each line is
the name of a file. I want to read this list of files into an array of
strings. I don't have any control over the creation of file.txt so I really
need to be able to read from it in it's existing format, a list of files
seperated by carriage returns.
|
by: Magix |
last post by:
Hi,
I have these string data: str_data1, str_data2, str_data3, which capture
some value after a routine process A. Then I would like to write (append)
these 3 string values into a text file each time after routine process A,
the text file is named "mytext.dat" in following format with "#####" as
separator.
The maximum entries of them is 5. When reaching the fifth entry, it will
delete the very first entry.
|
by: Testguy |
last post by:
Hi,
I have been reading various messages in this group, and could not find
an answer regarding what I am trying to do. At least, I could not find
an easy answer.
I am trying to figure out how to read and XML file and put the data in
fields in a VB application, and also how to write the information to
an XML file (either to a new file or modifying an existing file.
| |
by: Karthik |
last post by:
I am trying to read Http request body values NOT form values
The content type is text/xml and its POST
I am posting data from Infopath to an asp.net page.
In ASP it works by just writing Response.Write(request) the same does not
work in ASP.NET
I tried using Rquest.BinaryrRead() and Request.InputStream but it gives me
text values as space separated (eg Karthik yyyy aaaa) whereas the data i am
looking out for is in XML format.
|
by: Sumana |
last post by:
Hi All,
We developed our project on VC++.Net console application to
create image of disk and to write the image
We are having problem with reading and writing the sector
beyond 6GB Disk or Partition
we are using ReadFile , WriteFile and setFilePointerEx to read
and write the sectors and we are reading/writing 102400 sectors together,
even we have reduced the sectors still it is not able to
read or write,
our program is working fine...
|
by: nicolasg |
last post by:
Hi,
I'm trying to open a file (any file) in binary mode and save it inside
a new text file.
After that I want to read the source from the text file and save it
back to the disk with its original form. The problem is tha the binary
source that I extract from the text file seems to be diferent from the
source I saved. Here is my code:
1)
handle=file('image.gif','rb')
|
by: Bina |
last post by:
hi,
I want to read & write a html file which contain the japanese character. Now how i will do it?I can read & write english character . but when i read & write Japanese character from the html file then the writed html file cannnot show the japanese character. my new created html file show the another character, it cannot show the original japanese character. But when i read & write data from a txt file it works. But only problem is,When...
|
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
| |
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |