Hello,
I have a somewhat rare situation. I am attempting to pass $_POST data from a textarea field on a form into a iframe.
I have a page, say test.php. This page has access to $POST['message']. $POST['message'] contains newlines and other special characters.
From test.php, I am attempting to call an iframe. With normal data, the link for the iframe is usually ok if I just send it as $_GET values. e.g.:
<iframe src=\"testiframe.php?id=$_POST['id']\">
But since $POST['message'] contains newlines, the newlines can't be carried over into the $GET value. I have tried it both straight and with urlencode, neither with any luck. The text works, but newlines do not.
Does anyone know an eloquant solution to this? I was considering writing the contents of $_POST['message'] to a temp text file, then calling the contents of that temp file from the iframe page and erasing it. But that seems extravagant.
Has anyone ever tried passing data from one page into an iframe using anything other than $_GET values? Any help would be appreciated.
Thanks.