I have a form that I input the embed HTML for a video on YouTube or any other video site into, and a description as well. I now have it set up so when I submit the form it echos the contents so I can see if everything worked out ok. But, once i preview it i cannot figure out how to then decide to either submit it to the db or to go back to the form to edit the info. I know this is a sort of cloudy question but I am stuck and would appreciate any ideas.
Here is the script so far:
<?php
if(!$_POST){?>
<html>
<table>
<tr>
<td> <form method="post" action="<?php echo $_SERVER['PHP_SELF'] ?>"> Embed HTML:</td>
<td> <textarea rows="5" cols="50" wrap="virtual" name="embedHTML"> Enter Embed HTML Here </textarea></td>
</tr>
<tr>
<td>Description: </td>
<td><textarea rows="5" cols="50" wrap="physical" name="description"> Describe The Video Here </textarea></td>
</tr>
<tr>
<td><input type="submit" value="Add Video!"></form></td>
</tr>
</table>
</html>
<?php
} else {
if (isset($_POST['embedHTML'])||isset($_POST['description']))
{
require_once("dbConnect.php");
$embedHTML = trim(mysql_real_escape_string($_POST['embedHTML']));
$videoDesc = trim(mysql_real_escape_string($_POST['description']));
echo "<blockquote>";
echo $embedHTML;
echo "</blockquote>";
echo "<br />";
echo "<blockquote>";
echo $videoDesc;
echo "</blockquote>";
}
}
?>