Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Getting Double output from $_POST["longtext"]

Status
Not open for further replies.

NullTerminator

Programmer
Joined
Oct 13, 1998
Messages
293
Location
US
Just getting started with php. Redhat 8.0 php 4.2.2

Simple form
<form action=&quot;run.php&quot; method=&quot;POST&quot;>
<textarea name=&quot;longtext&quot; cols=50 rows=20>
</textarea><br>
<input type=&quot;submit&quot; value=&quot;Go!&quot;>
</form>

and target page
<html><body>
<?= $_POST[&quot;longtext&quot;]?>
<br>
<?= $_GET[&quot;inp&quot;]?>
<br>
<? phpinfo() ?>
</body></html>

output:
hello world goodbye...longtext=hello world goodbye...

why is this outputting the variable name and value like it is debug mode??

TIA
Jeb Beasley
 
Note:
The $_Get is in there to test teh get behavior. Same thing, data output twice.
 
where is inp coming from?

also have you tried

<? print $_POST[&quot;longtext&quot;] ?>

I am also new so im prolly wrong :[

[Hammer]
Nike Failed Slogans -- &quot;Just Don't Do It!&quot;
 
print yields same result

inp comes from URL if I test using 'GET' method...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top