I developed a plugin to view exam data in tabular format. I wan to show add new button at top left corner. This button will redirect a url. I generated this url in two way:
<a href="<?php echo plugins_url('includes/add_exam.php',__FILE__); ?>" class="page-title-action">Add New</a> <?php echo sprintf('<a href="?page=%s&action=%s" class="page-title-action">Add New</a>',$_REQUEST['page'],'add'); ?>
This tow lines generate two url as like:
respectively. After redirecting this I will do rest of coding to add new entry. I am new in wordpress. Hence I am afraid of standard of wordpress best practice. Any suggestion. If my two approach is wrong please give some instructions. Thanks in advance.