scenario is:
I have HTML a-tag in a page(call it 'index.php') which is a link to another page (lets call it page 'action.php') ! obviously
'action.php' page needs to receive a POST parameter, otherwise it return error!
i have the needed parameter in 'index.php' page, but i dont want to use form-tag to send it. Whenever user clicked on the a-tag, the parameter should be sent to the 'action.php' page.
Indeed, AJAX has nothing to do here, while i want to change the page, with sending the POST parameter whenever user click on my < a > !
example:
index.php
<a class='showProject' href='action.php' data-pid='<?php echo project_ID ?>'> PROJECT </a>
action.php
echo $_POST['project_id'];
i prefer that, if there is any way to do this, the jQuery Code starts with the following event:
$('.showProject').on('click',this,function(e){
/* YOUR SOLUTION */
});