i have dynamically created checkbox which will like yahoo mail if check box selected it will highlight a row but deleteall function is not working plz chek it - function doDeleteAll($objArray){
-
-
foreach($objArray['frmcheckall'] as $strkey=>$strValue) {
-
-
$strDeleteId = $strValue;
-
-
doDelete($strDeleteId);
-
-
}
-
}
-
function doDelete($strDeleteId){
-
-
$strQuery = "UPDATE
-
tbl_categories
-
SET
-
IsDeleted = 'Yes'
-
WHERE
-
CategoryId = '".$strDeleteId."'";
-
if(ExecuteQry($strQuery))
-
return 1;
-
else
-
return 0;
-
-
}
-
-
-
<tr class="tablehead" id="frmcheck<?php print $i; ?>">
-
<td height="25" align="center"><input name="frmcheckall<?php //print $i; ?>" type="checkbox" id="frmcheckall<?php print $i; ?>" value="<? print $strValue[$i]['CategoryId']; ?>" onclick="highlightRow('frmcheckall<?php print $i; ?>','frmcheck<?php print $i; ?>');" />
-
</td>
-
<td class="tablecontent"><? print $strValue[$i]['CategoryName']; ?></td>
-
<td align="center" class="tablecontent"><a href="edit.php?id=<? print $strValue[$i]['CategoryId']; ?>">Edit</a>
-
| <a href="javascript:deleteConfirm('cateogrylist.php?id=<? print $strValue[$i]['CategoryId']; ?>')">Delete
-
</a> </td>
-
</tr>
14 3320
Assuming title is the error then $objArray is empty
Hey there, Rashgang.
When posting code on the forums, be sure to use [code] tags. [code] .. code goes here [/code]. If you neglect to do so, you will be given a warning and possibly a temporary ban. Please read the Posting Guidelines on How To Ask A Question
Markus.
Is $objArray['frmcheckall'] an array as well or is $objArray the only array?
its a php script coding plz answer for it
this is the first time i am posting a question thats y
this function include in the main page of php - function doDeleteAll($objArray){
-
-
foreach($objArray['frmcheckall'] as $strkey=>$strValue) {
-
-
$strDeleteId = $strValue;
-
-
doDelete($strDeleteId);
-
-
}
-
}
-
function doDelete($strDeleteId){
-
-
$strQuery = "UPDATE
-
tbl_categories
-
SET
-
IsDeleted = 'Yes'
-
WHERE
-
CategoryId = '".$strDeleteId."'";
-
if(ExecuteQry($strQuery))
-
return 1;
-
else
-
return 0;
-
-
}
-
-
-
<tr class="tablehead" id="frmcheck<?php print $i; ?>">
-
<td height="25" align="center"><input name="frmcheckall<?php //print $i; ?>" type="checkbox" id="frmcheckall<?php print $i; ?>" value="<? print $strValue[$i]['CategoryId']; ?>" onclick="highlightRow('frmcheckall<?php print $i; ?>','frmcheck<?php print $i; ?>');" />
-
</td>
-
<td class="tablecontent"><? print $strValue[$i]['CategoryName']; ?></td>
-
<td align="center" class="tablecontent"><a href="edit.php?id=<? print $strValue[$i]['CategoryId']; ?>">Edit</a>
-
| <a href="javascript:deleteConfirm('cateogrylist.php?id=<? print $strValue[$i]['CategoryId']; ?>')">Delete
-
</a> </td>
-
</tr>
its a php script coding plz answer for it
this is the first time i am posting a question thats y
Of course it's a PHP script. That's why you posted it in the PHP forum.
That foreach requires that first argument to be an array expression. That's why I asked if you are sure that your first argument is an array.
Has somebody upset rashgang?
Has somebody upset rashgang?
I don't think so(not sure actually).
Rashgang, you have been told previously to use code tags in this thread!. You have now received a warning, and a continuation of this behaviour will typically result in a ban of some sort. It is in your best interests to follow the Posting Guidelines.
Markus.
I'd love to help but I can't bothered to find the line.
Use code tags and you get line numbers and people are much more likely to help you out.
nathj
rashgang, you are precariously close to border between ignorance and justified newby-ness. You have, in 4 posts, double posted and not once used code tags - something you were previously warned about. Therefore, this is your second formal warning. Please take note of this or you may receive a ban. Posting Guidelines - read them.
thank u for ur advice then i have tagged the php see clearly i have used code tags for example <?php
?>
thank u for ur advice then i have tagged the php see clearly i have used code tags for example <?php
?>
If you look at post 3 you will see I explain what code tags are.
Sign in to post your reply or Sign up for a free account.
Similar topics
by: jerrygarciuh |
last post by:
Hi all,
I was just wondering what popular opinion is on PHP giving this warning:
Warning: Invalid argument supplied for foreach() in
/home/boogerpic/public_html/my.php on line 6
when...
|
by: Ryanlawrence1 |
last post by:
Heya, I get these 2 errors:
Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/themepar/public_html/changepass.php on line 20
You have not entered all the...
|
by: techjohnny |
last post by:
Error:
Warning: mysql_query(): supplied argument is not a valid MySQL-Link
resource in /home/jplane/certcent/phpweb/quiz/index.php on line 20
Warning: mysql_num_rows(): supplied argument is...
|
by: lsmamadele |
last post by:
I am getting the following error messages in my search:
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/mamadele/public_html/BESTPLAYS/search.php on...
|
by: Breana |
last post by:
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/breana/public_html/category.php on line 88
-------------------------------------------
It does this...
|
by: yogitha |
last post by:
For the below code i am getting an error like :
---------------------------------------------------------------
Warning: fread(): supplied argument is not a valid stream resource in...
|
by: custom3 |
last post by:
Hello,
I keep getting the following warning:
"PHP Warning: Invalid argument supplied for foreach() in /home/csiexecu/public_html/modules/mod_mainmenu.php on line 339"
I am a novice Joomla...
|
by: guoxin |
last post by:
Hi All,
May i know how to rectify the following php error? Thanks folks
Warning: Invalid argument supplied for foreach() in /home/alan/do_add-user.php on line 36
do_add-user.php.php on...
|
by: chemlight |
last post by:
I'm having a problem. I'm sure I'm going to kick myself over the answer...
I have a table that stores vendors and their languages. This table starts out blank. I am querying the table to see if a...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new...
| |