Error processing text ...

From: Adam Rumpke (goldstonrumpke_at_hotmail.com)
Date: 03/22/04


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>&nbsp;&nbsp;&nbsp; <textarea rows="15" name="S1" cols="57">
</textarea>
<br>
<br>
<input type="submit" value="Save Data >>">
</p>
</form>
</body>
</html>

//////////////////////////////////////
Thanks in advance

- Adam



Relevant Pages

  • Error processing text ...
    ... I want this script to save my textbox input ... For some reason it wont work ...
    (alt.php)
  • Re: $ENV{CONTENT_LENGTH} / STDIN
    ... >> reason for a form in the first place. ... than about every other aspect of writing a script. ... > insecure may be perfect in the lab, but useless in the real world. ... hard-coded validation, rather than hard-coded names. ...
    (comp.lang.perl.misc)
  • Re: Is there a correct place to put javascript within a html file?
    ... The HTML specification tells you where script elements are permitted: ... script files have downloaded and if they're all in the head ... ... like the sensible thing to do; at least there's a reason for it. ... javascript is positioned just before the then the various html ...
    (comp.lang.javascript)
  • Re: Barbara Thiering Refuted!
    ... the particular script. ... John Byrne did. ... THIS HYPOTHESIS for the reason...what was the reason, ... capable of looking up the straight lines and crunching the numbers. ...
    (sci.archaeology)
  • Re: Barbara Thiering Refuted!
    ... the particular script. ... John Byrne did. ... THIS HYPOTHESIS for the reason...what was the reason, ... capable of looking up the straight lines and crunching the numbers. ...
    (sci.archaeology)