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

passing array checkbox value and update the database

P: 3
passing array checkbox value and update the database <?include 'dbconnect.php'; error_reporting(0);$update_qr="update vv_menu set publish='inactive' ";
$re_qr=mysql_query($update_qr) or die (mysql_error());
foreach($_POST['publish'] as $check=>$value)
{
$m_id=mysql_real_escape_string($value);
$update_qr="update vv_menu set publish='active' where itemid='$m_id' ";
echo $update_qr;
$re_qr=mysql_query($update_qr)or die (mysql_error());
?> The above code is correct or not. But i got null report
Mar 10 '07 #1
Share this Question
Share on Google+
3 Replies


ronverdonk
Expert 2.5K+
P: 4,258
Welcome to TSDN!

Before you post anything, read the Posting Guidelines at the top of this forum, especially the part about enclosing any shown code within code or php tags!!

Unformatted code is unreadable and diminishes your chance that anyone will look at it, puzzling.

The code as you show it cannot run anyway. E.g. where is your closing brace?

moderator
Mar 10 '07 #2

P: 3
Thank u for giving inofrmation
Mar 11 '07 #3

ronverdonk
Expert 2.5K+
P: 4,258
Does that mean that your problem is solved or not?

Ronald :cool:
Mar 12 '07 #4

Post your reply

Sign in to post your reply or Sign up for a free account.