Re: <TEXTAREA in and out of the db>
| From: | Richard S. Crawford | Date: | Tue, 06 Nov 2001 16:00:09 +0000 |
| Subject: | Re: <TEXTAREA in and out of the db> | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-14056@lists.php.net to get a copy of this message | ||
I can't really tell from your question what the problem is, but I'm assuming that it's not printing $content properly to the screen. First, double check the source code of the output just to make sure it really isn't there. Chances are, it is there but there is some character which is preventing it from displaying properly.
Try:
$content=htmlspecialchars($content);
print("$content");
fputs($fp,$content . "\n");
Using
print("htmlspecialchars($content)");
will produce undesirable output.
At 06:35 AM 11/6/2001, Michiel_Lange@actuera.com wrote:
Hiyas, small question: I am doing some things with text-fields. Now I worked a bit and I can put the text from the database in the <TEXTAREA> field. so far so good. Now, when I put this in a form, and added a nice submit button, I wanted it to send the field to the database, but somehow I cannot access the data in the textarea. So now I try to do it with a file and see what happens, but still nothing: <FORM METHOD="post" ACTION=saveit.php?fname=<?php print($filename); ?>> <TEXTAREA ROWS=40 COLS=80 NAME=content> <?phpSliante, Richard S. Crawford http://www.mossroot.com mailto:rscrawford@mossroot.com AIM: Buffalo2K ICQ: 11646404 Y!: rscrawford "It is only with the heart that we see rightly; what is essential is invisible to the eye." --Antoine de Saint Exupéry "Push the button, Max!"-> a loop that prints all the lines, did that, worked nice <-?> </TEXTAREA> <INPUT TYPE=SUBMIT bla bla> </FORM> ----------------- saveit.php:<?php $pfile="/tmp/$fname"; if(file_exists($pfile)) { print("$fname had to be deleted first.<BR>"); unlink($pfile); } $fp=fopen($pfile,"w"); print("Content:<BR>"); print("$content"); fputs($fp,htmlspecialchars($content) . "\n"); fclose($fp);when I get this working, I can easily dump it in a database... it's the textarea that is nagging me now :( Met vriendelijke groet, Michiel Lange ActuEra B.V. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-db-unsubscribe@lists.php.net For additional commands, e-mail: php-db-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net