Share information between php pages

1

I'm developing a WEB content and I came across a catch. I have an Item Listing page (Using JqDataTable).

Itturnsoutthatinthislistingtherearetwolinks,oneforeditingtheitemreferringtotheline,andanotherforthedeletion.

Byclickingonthechangeordeleteicons,theusermustberedirectedtotherespectivepage,andthatpageshouldreceivetheitemcodethattheuserwantstochangeordelete.

Idonotknowwhattoputonclickforittobedone.Cananyonehelpme?

    
asked by anonymous 17.08.2016 / 21:06

1 answer

2

You can use location.href with PHP - GET and POST methods .

onClick="location.href='delete.php?itemId=1'"

On your page that delete.php you use $_GET to recover

$itemId= $_GET['itemId'];
    
17.08.2016 / 21:13