Re: $_POST not working with str_replace
| From: | John W. Holmes | Date: | Tue, 23 Mar 2004 22:35:32 +0000 |
| Subject: | Re: $_POST not working with str_replace | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-181326@lists.php.net to get a copy of this message | ||
PHP Email List wrote:
Ok here's my problem, I'm in the midst of creating a string replace to work on a rtf file that is on the server, this fuctionallity works perfect with "GET" but not "POST", I guess I don't understand why. [snip]
$name = $_POST['FNAME']; [snip]
$output = str_replace("<<FNAME>>",$name,$output);There's no reason why something would work with $_GET['FNAME'] and not with $_POST['FNAME'], so I can understand why you're confused. Are you sure there are even any values in $_POST? Right at the beginning of rtf.php, put a print_r($_POST) to see what the values are. If $_POST is empty even when you put values in the form, then it must be an issue with your web browser or server not allowing POST values (that would be very odd, though). -- ---John Holmes... Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/ php|architect: The Magazine for PHP Professionals – www.phparch.com