foreach ($standit as $one) { echo '<div class="post"><iframe width="400" height="300" src=' . $one->videolink . ' frameborder="0" allowfullscreen></iframe></div>'; } } } ?> <?php $vid = new videos(); if ($_POST['name'] != '') { $vid->username = $_POST['name']; $vid->videolink = $_POST['vlink']; $vid->comment = $_POST['comment']; $vid->moderation = 'no'; $vid->save(false); } ?>