I want to select multiple option using check boxes(all values of checkboxes are come from database 1 ) and insert into the particular table in other database using php form.

Hmm, if i understand it corretly, you want to change databases depending on what boxes are selected? If you want users to select one option only, a switch would do.

    case "A":
        *some SQL here*
    case "B":
         * some SQL here*
     case "C":
         *some SQL here*

(This is just out of the top of my head, it might have syntax errors)

If you want your users to be able to select multipl boxes at the same time, and upload their data in multiple databases at once, you'll need to use a lot of IF's.
It could turn out to be a lot of duplicate code yes, but you can't use 1 SQL tag to insert into multiple databases.

That said, i'm not sure wether it is possible to insert into multiple tables in one database. That calls for experimentation

Member Avatar

How about you include your code so far?