Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7813465
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T04:52:31+00:00 2026-06-02T04:52:31+00:00

hello friends i m trying to make a inbox system in which we select

  • 0

hello friends i m trying to make a inbox system in which we select all checkbox with the help of one checkbox and then through ajax pass the value to all checkbox and update the database. but the problem is that they values and being selected one by one and then forming a array

for eg

fst time 2
second time 2,3
third time 2,3,4

and at the sql query where i am trying to get the list of array and break them so that i can update the value in database its also not happening , can anyone help ?here is what i coded.

to get the value of checkbox

           $(function(){
   $('.massmsgdelbutton').click(function(){
    var val = [];
  $('.sltchk:checked').each(function(i){
   val[i] = $(this).val();
  var dataString = 'massmsgdel='+ val;
  if(confirm("Sure you want move all these messages to Trash? There is NO undo!"))
  {

$.ajax({
 type: "POST",
 url: "modules/messages/sql_ex.php",
data: dataString,
 cache: false,

 success: function(html){
 alert(html);
  }
 });

  }

});
 });
});

my sql code using expode to explode the array

       if(isset($_REQUEST['massmsgdel']))
         {
     $id=$_REQUEST['massmsgdel'];
        $myArray[] = explode(',', $id);
     echo $id;
        $sql=mysql_query("update message set trash='1' where message_id='$myArray'");
        }
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-02T04:52:33+00:00Added an answer on June 2, 2026 at 4:52 am

    guys i found the solution .

    in the jquery i had to use

      var dataString = 'massmsgdel='+ val[i];
    

    instead of

      var dataString = 'massmsgdel='+ val;
    

    and in sql i had to use

          $sql=mysql_query("update message set trash='1' where message_id IN ('$myArray')");
    

    thanks @Frank Allenby for helping me the way out

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Hello all my friends, I am trying to send a long string through socket
Hello Friends, I make one app in android, in which i take three radio
• hello friends, • I have one solution say sol1 ’ which contain one
hello friends i am developing one intranet application called human resource information system using
hello friends i have created a UDP chatting program through which the clients can
Hello friends i am running code given below which contains the setLogTimeEntery function and
Hello friends i need a book/ tutorials for rails without using scoffold. All the
hello friends i want to use toggle on <li> when one <li> is open
hello friends i am having two frames, each frame has a html form which
hello friends i am trying to get a list of user id and want

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.