query("SELECT ipb_id from archived_vb_import_log WHERE (type = 'forums' AND foreign_id = '" . $f . "')"); while($row = mysqli_fetch_assoc($result)) { $id = $row['ipb_id']; } if ($id > 0) { header('Location: http://www.portaldasviagens.com/forums/' . $id . ''); } else { header('Location: http://www.portaldasviagens.com/'); } ?>