Error processing text ...
From: Adam Rumpke (goldstonrumpke_at_hotmail.com)
Date: 03/22/04
- Next message: Jacqueline Snook: "Re: Close window when form submitted"
- Previous message: Adam Rumpke: "Re: Please help with the scripts"
- Next in thread: Jürgen Exner: "Re: Error processing text ..."
- Reply: Jürgen Exner: "Re: Error processing text ..."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 22 Mar 2004 02:12:53 -0800
Can some please help me. I want this script to save my textbox input
from the form to the file about.txt ... For some reason it wont work
and I am confused.
//////////////////////////////////////
saveAbout.php
//////////////////////////////////////
<?php
$fp = @fopen("about.txt", "rb") or die("Couldn't open file");
$data = fread($fp, filesize($fp));
while(!feof($fp))
{
$data .= fgets($fp, 1024);
}
fclose($fp);
$values = explode("\r\n", $data);
echo . $values[0] . " " . $values[1] . "<br>";
?>
//////////////////////////////////////
formAbout.html
//////////////////////////////////////
<html>
<head>
<title> About Us Editor </title>
</head>
<body bgcolor="#ffffff">
<form action="saveAbout.php" method="post">
Edit the topic in the box below :
<p> <textarea rows="15" name="S1" cols="57">
</textarea>
<br>
<br>
<input type="submit" value="Save Data >>">
</p>
</form>
</body>
</html>
//////////////////////////////////////
Thanks in advance
- Adam
- Next message: Jacqueline Snook: "Re: Close window when form submitted"
- Previous message: Adam Rumpke: "Re: Please help with the scripts"
- Next in thread: Jürgen Exner: "Re: Error processing text ..."
- Reply: Jürgen Exner: "Re: Error processing text ..."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|