By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,474 Members | 1,283 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,474 IT Pros & Developers. It's quick & easy.

need help deleting multiple records -

P: n/a
I am retrieving records for Customer ID as follows and displaying them
as table rows with a checkbox for multiple deletion.

Part of a </FORM>
************************************************** **************
$recordset=Array();
$c=0;
while (ora_fetch_into($cursor,$recordset,ORA_FETCHINTO_N ULLS|
ORA_FETCHINTO_ASSOC))
{
echo "<TR>".
"<TD><INPUT TYPE=Checkbox name=No[ ] Value=".$c."></TD>".
"<TD>".$recordset["CUSTID"]."</TD>".
"<TD>".$recordset["TITLE"]."</TD>".
"</TR>";
$c=$c+1;
}
************************************************** ***************

I am quite confused what should be my query string in the submit file.
I want to delete matching Customer IDs in the table from the checked
records. Please suggest how I can frame the query. I am currently able
to delete just one record.

-CD

Jul 17 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
I am trying
print $HTTP_POST_VARS['No'];
to see what the array contains but getting Undefined index: No as an
error message.

Jul 17 '05 #2

P: n/a
I noticed that Message-ID:
<11*********************@o13g2000cwo.googlegroups. com> from
co***********@yahoo.com contained the following:
$c=0;
while (ora_fetch_into($cursor,$recordset,ORA_FETCHINTO_N ULLS|
ORA_FETCHINTO_ASSOC))
{
echo "<TR>".
"<TD><INPUT TYPE=Checkbox name=No[ ] Value=".$c."></TD>".


I don't know about the query string but I suggest you look at the html
first.

<TD><INPUT TYPE=Checkbox name='No[ ]' Value='".$c."'></TD>".

And shouldn't the value be the id?

<TD><INPUT TYPE=Checkbox name='No[ ]'
Value='".$recordset["CUSTID"]."'></TD>".

Then try a print_r ($_POST['No']); and see what you get.


--
Geoff Berrow (put thecat out to email)
It's only Usenet, no one dies.
My opinions, not the committee's, mine.
Simple RFDs http://www.ckdog.co.uk/rfdmaker/
Jul 17 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.