find and delete specific line from text file
cart.txt (tab delimated)
guiburi PID001 KARLSTAD Sofa 2348 2 4696
guiburi PID002 BESTA Cabinet 1656 32 52992
guiburi PID009 PAX Wordrobe 1794 2 3588
deleteitem.php
if(isset($_GET['pname']))
{
$pname = trim($_GET['pname']);
}
Info
pname is sent from a another file using url and it used to match with the 3rd colum of the cart file and then delete the line.write back to the same file
ive tried many ways but no luck. any help? thanks