> -----Original Message-----
> From: Brent Baisley [mailto:[EMAIL PROTECTED]

> What is
> interchangeable is $_REQUEST with $_POST or $_GET. You may try using
> $_REQUEST just for testing. If it works, then you could use $_REQUEST
> since it will work with GET or POST variables. Although that's not the
> best idea from a security standpoint.
> Also, have you looked at the web page source that is delivered to the
> browser? The web server may be serving a cached version of the page
> that has the form method set to GET instead of POST.
> Just throwing out some other ideas since you said you've tried most
> everything else.


Ok here's the deal, I cut out the middle man, went straight to the script,
assigned my variable a string, and loaded the rtf page, NADA, ZIP, ZILCH!!
The string replace function isn't even picking up the variable from within
the same script! Here's the code....

(I added ---> to show where the variable is)
rtf1.php

<?php
//print_r($_POST);
//$na = $_GET['f'];
---->$na == "Me";
$filename = "fname.rtf";

header('Content-Type: application/msword');

header('Content-Disposition: inline, "rtftest.rtf"');

$fp = fopen($filename, "r");

$output = fread($fp, filesize($filename));

$output = str_replace('<N>', ---->$na, $output);
echo $output;
?>

So I have now determined that this has NOTHING to do with Get vs Post,
however, LOL, funny thing is, I put in my "$na = $_GET['f'];" from the form,
press submit and it works fine. This is seriously screwed up!!
For the sake of sanity, here is all of the form html....

rtf.html

<HTML>
<BODY>
<FORM Action=rtf1.php Method="GET">
<Input type=text name="f" length=5>
<Input type=submit name=submit value="Test">
</FORM>
</Body>
</Html>

That's IT! And yes I have changed all the GET and POST parameters 5 times.
But this new find is what has really got me, why doesn't the str_replace();
function even pick up the "$na" variable from within the same script?

SERIOUSLY CONFUSED
Wolf >:-/ (sigh...)

PS. For the sake of simplicity, I made my rtf file from word show this
">><<N>><<", on load it pulls out the <N> as it should but isn't replacing
anything there at all it shows this >><><< on load. Thanks in advanced for
this huge issue.  Because now, I can't even do my work around by loading
everything into a database first and then loading variables from there, as
str_replace() isn't even picking up on a straight variable either.  BUG??
I'm beginning to believe it is.  Maybe I should try pregmatch or some other
string swapping function. I don't know....Please help...

Thanks again!!

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to