Within my index.html page I am taking in from the user an embed link such as:
<iframe width='560' height='315' src='http://www.youtube.com/embed/GasAmUfvXJs' frameborder='0' allowfullscreen></iframe>
This code will be passed to my PHP script which will store it in a variable and perform some validation on it. After the validation has been successful, I then tried to echo out the variable within the PHP script. But it does not display it correctly.
Here is the PHP script:
<?php
if(isset($_POST['embed']) && isset($_POST['date'])){
$embed = $_POST['embed'];
$date = $_POST['date'];
if(!empty($embed) && !empty($date)){
echo "OK - VIDEO";
$final = $embed;
echo "$final";
}else{
$final = "Try again - not empty";
echo "$final";
}
}else{
echo "try again - not set";
}
?>