anonīms Posted June 5, 2008 Report Share Posted June 5, 2008 (edited) Warning: Invalid argument supplied for foreach() in foreach($_POST['id'] as $vest_id) { mysql_query("DELETE FROM vestules WHERE id = '$vest_id'"); } Kas par vainu? Edited June 5, 2008 by anonīms Link to comment Share on other sites More sharing options...
duplets Posted June 5, 2008 Report Share Posted June 5, 2008 Vienkāršak nav : $vest_id = $_POST['id']; ?? Problēma ir tur kad tas forēč pielīdzina postid tam vestid, bet tu viņu nevari izmantot, kā argumentu kā veikšanai, nejauc: if () { } ar kkādu fciju Link to comment Share on other sites More sharing options...
bubu Posted June 5, 2008 Report Share Posted June 5, 2008 Vaina tur, ka $_POST['id'] tev visdrīzāk nesatur masīvu. Izvadi to ar print_r un pārliecinies vai tiešām tas ir masīvs. Link to comment Share on other sites More sharing options...
Ghenis Posted June 5, 2008 Report Share Posted June 5, 2008 PHP kā masīvus uztver tikai inputus ar [] beigās. Respektīvi, nomaini input nosaukumu no id uz id[] Link to comment Share on other sites More sharing options...
Recommended Posts