redarrow Posted September 6, 2006 Share Posted September 6, 2006 i just submitted this as an ansaw do you think it will work?[code]<?php//database connection$query="select * from post";$result=mysql_query($query);while($record=mysql_fetch_assoc($result)){echo $record['description'];?><form method="POST" action""><br>delete post<br><input type="radio" name="yes">click for yes.......<br><?php}if(isset($_POST['submit'])){if($record['description']=="yes"){$del="delete from post where description='".$record['description']."'";$del_res=mysql_quey($del);} }?><input type="submit" name="submit" value="delete"></form>[/code] Quote Link to comment Share on other sites More sharing options...
onlyican Posted September 6, 2006 Share Posted September 6, 2006 if($record["description"] == "yes"){Now lets put $record["description"] into a word, for this function to work$record["description"] has to be yessoif("yes" == "yes"){$del = "DELETE FROM posts WHERE description = 'yes'";} Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.