Hello all ,
In my form a list of Category names are retrieved from
database & displayed as Link on it.
onclick of this category named link it send its row id to the
second page & there using a variable recieve this id as
then use this variable to show all the data of this row idPHP Code:$id = $_GET['id'] ;
using in a query as
& this shows all the data successfully .PHP Code:$sql = "SELECT * FROM `mytable` WHERE `ID`='$id' ";
But the problem arises that when i reuse this recieved
variable $id , for another query to Delete this specific row
as
the value of this id in Delete query displayed Blank (using echo) asPHP Code:echo " DELETE FROM `mytable` WHERE `ID` = '$id' ";
& So Delete operation is not performed successfully .PHP Code:DELETE FROM `mytable` WHERE `ID` = ''
I don't understand why this variable $id can't
reuse its value again in other queries also there rather than
only once .
Please suggest solutions regarding these.
Thanks & Regards.



Reply With Quote
Bookmarks