I am having problems sending an iframe code. The [src] parameter is deleted after sending. Codes and preview as follows.
Php:
if(isset($_POST['post'])){
echo $_POST['frame'];
}
Html:
<form method="post">
<input value="<iframe src='https://jsfiddle.net/'></iframe>" type="text" name="frame">
<button name="post" type="submit">Submit</button>
</form>
Display output: enter image description here
form.php
<?php
$homepage = file_get_contents('https://www.jsfiddle.net/');
echo $homepage;
?>
show.php
<iframe src="form.php"></iframe>
it isn't a perfect solution, but I think it is the best for this situation. Some sites you won't run into the problems you discussed.