I'm working on the index.php. In the index page, my php code is generating Columns and Row(Table) in html. I am new to Jquery.
PHP generated table example
ID | Username | Status | Action
1 Demo No Install button
2 Smith No Install button
3 Edward No Install button
4 Admin No Install button
In the Action column , I've added Install button. So , my plan is to call update.php using Jquery AJAX POST when Install button is clicked.
Update Page Having POST variable :
1) id
2) action
3) flag
Now, what I've done so far.
Following code is generated by my PHP code (RAW code, for understanding)
<input type='hidden' name='id' id='1' value='1'>
<a href class='blue' href='' id='1'>Install</a>
<input type='hidden' name='id' id='2' value='2'>
<a href class='blue' href='' id='2'>Install</a>
<input type='hidden' name='id' id='3' value='3'>
<a href class='blue' href='' id='3'>Install</a>
<input type='hidden' name='id' id='4' value='4'>
<a href class='blue' href='' id='4'>Install</a>
Issue is how I can generate Jquery AJAX POST url, which will send data like
update.php?id=1&action=install&flag=1
Please suggest me.