RE: [PHP] $_POST not working with str_replace
| From: | Chris W. Parker | Date: | Tue, 23 Mar 2004 23:21:12 +0000 |
| Subject: | RE: [PHP] $_POST not working with str_replace | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-181330@lists.php.net to get a copy of this message | ||
PHP Email List <mailto:php@wolf-smart.com>
on Tuesday, March 23, 2004 3:08 PM said:
> This is becoming very odd!
> Possible bug? I hate throwing that out there but it doesn't make
> sense why one would work and the other wouldn't since all any of them
> are doing is holding "strings". Any other ideas?
sorry, jumping in late. hopefully this hasn't already been covered.
using some code from a previous email:
>> why. [snip] $name = $_POST['FNAME'];
> [snip]
>> $output = str_replace("<<FNAME>>",$name,$output);
what happens if you do the following?
<?php
$name = $_POST['FNAME'];
echo "::$name::";
$output = str_replace("<<FNAME>>", $name, $output);
?>
??
Do you get the expected value betwee the two ::'s? If you aren't getting
what you're expecting that's where your problem is. If the contrary is
true, I have no idea. ;)
chris.