hi dears.
i have a name in mysql and i wrote this code for delete a row:
<form id="form1" name="form1" method="get" action="Delete.php"><input type="submit" name="<?php echo $name=$row["name"]; ?>" value="Delete" /></form>
i use session in my pages.
in the statistic.php, i show infos and in the delete.php i wanna delete a complete recore for example "where name= M.K_Soft". i can i distinguish the name in the code above and send it to the delete page so that i delete it?
but it doesn't work.
i just wanna send the name in the Delete.php and there i delete it and also back to the statistics.php.
please help me.
thanke you in advance.
make a delete code
Moderator: General Moderators
- daedalus__
- DevNet Resident
- Posts: 1925
- Joined: Thu Feb 09, 2006 4:52 pm
Re: make a delete code
buddy you need to post more code. what are you using to delete the record?
also this works:
but im going to say that it is wrong. why would you assign a value to a variable and then immediately echo it? do you use it in another place in the page? and if you do then why not declare in another place where it is easier to keep track of it?
also this works:
Code: Select all
echo $name=$row["name"];
Re: make a delete code
hi dear. so appreciate to reply so soon.daedalus__ wrote:buddy you need to post more code. what are you using to delete the record?
also this works:
but im going to say that it is wrong. why would you assign a value to a variable and then immediately echo it? do you use it in another place in the page? and if you do then why not declare in another place where it is easier to keep track of it?Code: Select all
echo $name=$row["name"];
i echo that to see it in the next page. i think i just need the name to reove all it's row from the table.
actually, i have a table named "stdb" and one of it's row is "name". i wanna send the "name" parameter to a page called delete. then delete the row which has this para meter and then delete the row.
if there is a better way, please assist me.
thanks.