Can one <form> submit data to multiple tables?

Ask a Question related to Dreamweaver AppDev, Design and Development.

  1. #1

    Default Can one <form> submit data to multiple tables?

    Am I able to use a single form to write data to multiple tables in my database using php/mySQL?
    jip Guest

  2. Similar Questions and Discussions

    1. Submit Form Data Application?
      I thought I saw an software extension that allowed form submission in Dreamweaver for us designers who can't figure out all the technical stuff. By...
    2. Multiple tables for same data - how to sort
      Hi We are developing an application that stores logging data in a mysql database. Due to some facts, we decided to store the loggingdata in a...
    3. update multiple records in multiple tables from one form
      hello I have been trying to run multiple update queries based on the data entered by user. Brief background: I am fetching data from various...
    4. How do you delete a record form multiple tables
      I have a dbase that has about 30 tables in it. How can I delete a record out of all of the tables without doing 30 DELETE statements? Example:...
    5. ASP form writing to multiple DB tables.
      I'm new to Access and ASP pages, but so far I have been doing OK. This one has me stumped. What I am trying to do is have an ASP form with several...
  3. #2

    Default Re: Can one <form> submit data to multiple tables?

    .oO(jip)
    >Am I able to use a single form to write data to multiple tables in my
    >database using php/mySQL?
    Sure. You can do whatever you want with the submitted data in the form
    processing script, there are no restrictions of any kind.

    Micha
    Michael Fesser Guest

  4. #3

    Default Re: Can one <form> submit data to multiple tables?

    You'll need to write more than one query, but once you capture the POST data to
    your script you can use it as often as you like. You mean something like
    this?...
    Code:
     /* get post data from form */ $foo = $_POST['bar'];  /* insert
    it */ $query1 = 'INSERT INTO table1 VALUES ($foo)'; mysql_query($query1);  /*
    insert it again elsewhere */ $query2 = 'INSERT INTO table2 VALUES ($foo)';
    mysql_query($query2);
    You could also establish multiple DB connections
    to use the data in queries to different DBs.

    visuality Guest

  5. #4

    Default Re: Can one <form> submit data to multiple tables?

    Thanks for the feedback!
    jip Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139