logicopinion Posted October 10, 2007 Share Posted October 10, 2007 whats wrong ? <?php echo "<pre>".var_export($_POST, true)."</pre>"; die(); mysql_connect("localhost", "root", "") or die ("Could not connect"); mysql_select_db("db1") or die ("Could not connect to DB"); if ($_POST['delete']) { $deleteID = $_POST['delete']; foeach($_POST["delete"] as $key => $id) { mysql_query("DELETE FROM dbtable WHERE id='".(int)$id."'") or die(mysql_error()); echo "The Row Number ".(int)$id." has been Successfully Removed"; } } else { echo "please select at least one row, to delete it"; } ?> Thank You Quote Link to comment https://forums.phpfreaks.com/topic/72641-solved-error-nexpected-t_as/ Share on other sites More sharing options...
GingerRobot Posted October 10, 2007 Share Posted October 10, 2007 Typo on this line: foeach($_POST["delete"] as $key => $id) Next time, try posting the actual error message and the line in question. Saves people the time it takes to look through it. Quote Link to comment https://forums.phpfreaks.com/topic/72641-solved-error-nexpected-t_as/#findComment-366243 Share on other sites More sharing options...
logicopinion Posted October 10, 2007 Author Share Posted October 10, 2007 thanks a lot. Quote Link to comment https://forums.phpfreaks.com/topic/72641-solved-error-nexpected-t_as/#findComment-366253 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.