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] Link to comment https://forums.phpfreaks.com/topic/19896-click-for-yes-and-delete-help-lol/ 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'";} Link to comment https://forums.phpfreaks.com/topic/19896-click-for-yes-and-delete-help-lol/#findComment-87070 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.