Blame Posted June 28, 2009 Share Posted June 28, 2009 if (($submit) && ($location == "delete")){ if ($_POST['radio']){ foreach($_POST['radio'] as $val){ mysql_query("DELETE FROM `topics` WHERE `id` = '$val' LIMIT 1")or die(mysql_error()); $upd = "Topics deleted."; upd($upd); print ("<META HTTP-EQUIV=\"refresh\" content=\"1; url=forum.php?forum=".$forum."\">"); } Link to comment https://forums.phpfreaks.com/topic/163983-is-this-right/ Share on other sites More sharing options...
Blame Posted June 28, 2009 Author Share Posted June 28, 2009 I have errors round these lines if ($_POST['radio']){ foreach($_POST['radio'] as $val){ Link to comment https://forums.phpfreaks.com/topic/163983-is-this-right/#findComment-865073 Share on other sites More sharing options...
dzelenika Posted June 28, 2009 Share Posted June 28, 2009 I have errors round these lines if ($_POST['radio']){ foreach($_POST['radio'] as $val){ what error? Link to comment https://forums.phpfreaks.com/topic/163983-is-this-right/#findComment-865119 Share on other sites More sharing options...
Blame Posted June 28, 2009 Author Share Posted June 28, 2009 foreach($_POST['radio'] as $val){ something to do with the { Link to comment https://forums.phpfreaks.com/topic/163983-is-this-right/#findComment-865131 Share on other sites More sharing options...
dzelenika Posted June 28, 2009 Share Posted June 28, 2009 what is the text of error you get? Link to comment https://forums.phpfreaks.com/topic/163983-is-this-right/#findComment-865136 Share on other sites More sharing options...
Hybride Posted June 28, 2009 Share Posted June 28, 2009 foreach works with arrays - is your $_POST['radio'] an array? And your if($_POST['radio']) is a strange statement - are you talking about if it's selected or what? Link to comment https://forums.phpfreaks.com/topic/163983-is-this-right/#findComment-865160 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.