You are here: RE: [PHP] textarea posting duplicate text « PHP « IT news, forums, messages
RE: [PHP] textarea posting duplicate text

Posted by Elizabeth Lawrence on 03/01/05 16:43

Thanks, Dan. I copied your code exactly and posted it here:
http://www.tidefans.com/test.php I pasted a large part of O'Henry's "Gift of
the Magi" into the textarea, and it gets repeated, as before.

Thanks for any help,
Elizabeth

-----Original Message-----
From: Dan Tappin [mailto:dan@orourke.ca]
Sent: Monday, February 28, 2005 6:59 PM
To: Elizabeth Lawrence
Subject: Re: [PHP] textarea posting duplicate text

Create a new file:

test.php

with this exactly in the contents:

<HTML>
<HEAD>
<TITLE>TEST</TITLE>
</HEAD>

<BODY>
<FORM ACTION="test.php" METHOD="post" NAME="test">
<TEXTAREA NAME="textarea" ROWS="4"
COLS="40"></TEXTAREA>
<P><INPUT TYPE="submit" NAME="submitButtonName"></P>
</FORM>
<P><? print_r($_REQUEST); ?></P>
</BODY>

</HTML>

Load the page, enter some text and hit submit. Rule out some strange
issue with your page. Confirm it's a PHP issue not a coding one.

Dan T

On Feb 28, 2005, at 8:03 AM, Elizabeth Lawrence wrote:

> Hello. I have been asked to look at a PHP issue for someone, and I
> can't
> figure out what the problem is. I'm hoping one of you experts can help!
>
>
>
> They are using Red Hat Linux / Ensim Pro 4.0.2, PHP 4.3.10, and Apache
> 2.0.
>
>
>
> The problem: When a lot of text is entered into a textarea on a form,
> the
> text that shows up in the $_POST['textarea'] variable has the text
> that was
> entered, but it is duplicated. This is causing problems for their
> forums.
> Here is a very simple script I placed on the server:
> www.tidefans.com/textarea_test.php (code below)
>
> When I place the same script on another server I have access to, the
> textarea text is "posted" fine.
>
> Is this a PHP setting somewhere that I'm missing?
>
>
>
> Here is the code for the PHP script mentioned above:
>
> <html>
>
> <head>
>
> <title>Test PHP Script</title>
>
> </head>
>
> <body>
>
> <form method=post action="textarea_test.php" name="Form1">
>
> <textarea cols=50 rows=20 name=textarea>
>
> //[a bunch of text goes here]
>
> </textarea><br>
>
> <input type=text name=text size=20 value="This is some text"><br>
>
> <input type=submit name=Submit value="Submit">
>
> <?php
>
> if ($_POST[Submit] != "")
>
> {
>
> echo "<h1>_POST values</h1>";
>
> echo "<p>Textarea submitted:</p>";
>
> echo "<pre>" . $_POST[textarea] . "</pre>";
>
> echo "<p>Textbox submitted:</p>";
>
> echo "<pre>" . $_POST[text] . "</pre>";
>
> echo "<p>Submit submitted:</p>";
>
> echo "<pre>" . $_POST[Submit] . "</pre>";
>
> }
>
> ?>
>
> </form>
>
> <?php
>
> phpinfo();
>
> ?>
>
> </body>
>
> </html>
>
>
>
> If anyone can point me in the right direction, I would appreciate it so
> much!
>
> Elizabeth
>
>
>
> Elizabeth Lawrence
>
> elawrence@nsggroup.com
>
>
>

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация