send id through the link with php and MySQL

osso

New Member
I have table with items and for each item there is an option for user to delete and restore it. And there is special php file for it 'delete.php'.\[code\]print "<td>";if ($row['deleted'] == 'y') {print "<a href='http://stackoverflow.com/questions/12785372/delete.php?id=2'>Undeleted</a> "; }if ($row['deleted'] == 'n') {print "<a href='http://stackoverflow.com/questions/12785372/delete.php?id=1'>Deleted</a> "; //'$_GET['id']'}print "</td>"\[/code\]My question is how can I get the id of item that user clicked and send it to 'delete.php'?So instead of \[code\]"<a href='http://stackoverflow.com/questions/12785372/delete.php?**id=2**'>Undeleted</a> ";\[/code\]there should be something like:\[code\] "<a href='http://stackoverflow.com/questions/12785372/delete.php?**$_GET['id']'**'>Undeleted</a> ";\[/code\]or\[code\] "<a href='http://stackoverflow.com/questions/12785372/delete.php?**<?php $_GET['id'] ?>**'>Undeleted</a> ";\[/code\]but in second example it doesn't make sense php inside php. I think I probably just don't know correct syntax.
 
Back
Top