Jump to content


Photo

click for yes and delete help lol


  • Please log in to reply
1 reply to this topic

#1 redarrow

redarrow
  • Members
  • PipPipPip
  • Advanced Member
  • 7,308 posts
  • Locationlondon

Posted 06 September 2006 - 12:54 PM

i just submitted this as an ansaw do you think it will work?

<?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>

Wish i new all about php DAM i will have to learn
((EMAIL CODE THAT WORKS))
http://simpleforum.ath.cx/mail2.inc
((PAYPAL INTEGRATION THAT WORKS))
http://simpleforum.a...aypal1_info.inc

#2 onlyican

onlyican
  • Members
  • PipPipPip
  • Advanced Member
  • 921 posts
  • LocationHants - UK

Posted 06 September 2006 - 01:16 PM

if($record["description"] == "yes"){
Now lets put $record["description"] into a word, for this function to work
$record["description"] has to be yes

so
if("yes" == "yes"){
$del = "DELETE FROM posts WHERE description = 'yes'";
}


Tell me the problem, I will try tell you the solution




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users