Есть кнопка нажимая на которую должно перекинуть по ссылке,но при нажатии ничего не происходит,подскажите как пофиксить? </div> <?php if ($info['affiliate_link'] != ''): ?> <div class="modal-footer d-flex align-items-center justify-content-center border-0 mt-0 pt-0 mb-3"> <form method="post"> <input type="hidden" name="count" value="<?= $info['id'] ?>"> <button class="btn btn-success" name="affiliate" type="submit" onClick="window.open('<?= $info['affiliate_link'] ?>');"> <span>Перейти на сайт компании</span> </button> </form> </div> <?php endif; ?>
<?php if (!empty($info['affiliate_link'])): ?> <div class="modal-footer d-flex align-items-center justify-content-center border-0 mt-0 pt-0 mb-3"> <form method="post"> <input type="hidden" name="count" value="<?= htmlspecialchars($info['id']) ?>"> <button class="btn btn-success" name="affiliate" type="submit" onclick="window.open('<?= htmlspecialchars($info['affiliate_link']) ?>');"> <span>Перейти на сайт компании</span> </button> </form> </div> <?php endif; ?> PHP <?php if (!empty($info['affiliate_link'])): ?> <div class="modal-footer d-flex align-items-center justify-content-center border-0 mt-0 pt-0 mb-3"> <form method="post"> <input type="hidden" name="count" value="<?= htmlspecialchars($info['id']) ?>"> <button class="btn btn-success" name="affiliate" type="submit" onclick="window.open('<?= htmlspecialchars($info['affiliate_link']) ?>');"> <span>Перейти на сайт компании</span> </button> </form> </div> <?php endif; ?>
</div> <?php if ($info['affiliate_link'] != ''): ?> <div class="modal-footer d-flex align-items-center justify-content-center border-0 mt-0 pt-0 mb-3"> <form method="post" action="<?= $info['affiliate_link'] ?>" target="_blank"> <input type="hidden" name="count" value="<?= $info['id'] ?>"> <button class="btn btn-success" name="affiliate" type="submit"> <span>Перейти на сайт компании</span> </button> </form> </div> <?php endif; ?> PHP </div> <?php if ($info['affiliate_link'] != ''): ?> <div class="modal-footer d-flex align-items-center justify-content-center border-0 mt-0 pt-0 mb-3"> <form method="post" action="<?= $info['affiliate_link'] ?>" target="_blank"> <input type="hidden" name="count" value="<?= $info['id'] ?>"> <button class="btn btn-success" name="affiliate" type="submit"> <span>Перейти на сайт компании</span> </button> </form> </div> <?php endif; ?>