I have a preview page or an email that is created with html and php. So basically on this page there is a big $body string that can contain any html and php. But I want to send this string to another page with a link:
echo '<a href="[theURL]?body='.htmlentities($body).'">Click here</a>';
the link goes to a second php page that should display everything the same was as on the first page:
<?php
if(isset($_GET["body"])){
echo html_entity_decode($_GET["body"]);
//echo htmlspecialchars_decode($_GET["body"]);
}
?>
the second page gets the string in the url, but remain empty. so either it's not decoding it right or i missed something simple? the url looks something like this: %20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20
%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20Is there a better way to do this than $_GET? I tried to use a form instead of a link and use post, but it didn't seem to work.