title: Trying to Insert data to multiple tables in single query in php
body: <p>Im trying to add data to multiple tables using a single query. 
  <a href="https://i.stack.imgur.com/GxKDf.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/GxKDf.png" alt="enter image description here"></a>
  These two tables are contacts and address. I think the issue is with my address table. IS it a good idea to separate my address table? since multiple contacts can share the same address.(family)</p>
  
  <p><strong>Query for inserting data</strong></p>
  
  <pre><code>$sql = "INSERT INTO contacts (firstName,lastName,nickName,cellNumber,homeNumber,workNumber) VALUES ($firstName,$lastName,$nickName,$cellNumber,$homeNumber,$workNumber) "
          . "INSERT INTO address(street,city,state,country) VALUES($street,$city,$state,$country) INSERT INTO contacts (email,birthday,memo)"
          . "values($email,$birthday,$memo)";
  </code></pre>
  
  <p><strong>My HTML form</strong> </p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;fieldset&gt;
                  &lt;legend&gt;Register Form&lt;/legend&gt;
                  &lt;div&gt;
                      &lt;input type="text" name="firstName" placeholder="First Name"/&gt;
                  &lt;/div&gt;
                  &lt;div&gt;
                      &lt;input type="text" name="lastName" placeholder="Last Name"/&gt;
                  &lt;/div&gt;
                   &lt;div&gt;
                      &lt;input type="text" name="nickName" placeholder="Nick Name"/&gt;
                  &lt;/div&gt;
                   &lt;div&gt;
                      &lt;input type="text" name="cellNumber" placeholder="Cell Number"/&gt;
                  &lt;/div&gt;
                   &lt;div&gt;
                      &lt;input type="text" name="homeNumber" placeholder="Home Number"/&gt;
                  &lt;/div&gt;
                   &lt;div&gt;
                      &lt;input type="text" name="workNumber" placeholder="Work Number"/&gt;
                  &lt;/div&gt;
                   &lt;div&gt;
                      &lt;input type="text" name="street" placeholder="Street"/&gt;
                  &lt;/div&gt;
                   &lt;div&gt;
                      &lt;input type="text" name="city" placeholder="City"/&gt;
                  &lt;/div&gt;
                   &lt;div&gt;
                      &lt;input type="text" name="state" placeholder="state"/&gt;
                  &lt;/div&gt;
                  &lt;div&gt;
                      &lt;input type="text" name="country" placeholder="country"/&gt;
                  &lt;/div&gt;
                  &lt;div&gt;
                      &lt;input type="text" name="email" placeholder="Email"/&gt;
                  &lt;/div&gt;
                  &lt;div&gt;
                      &lt;input type="text" name="birthday" placeholder="Birthday"/&gt;
                  &lt;/div&gt;
                  &lt;div&gt;
                      &lt;div class="small"&gt;&lt;/div&gt;
                      &lt;textarea name="memo" placeholder="Memo"&gt;&lt;/textarea&gt;
                  &lt;/div&gt;    
                  &lt;input type="submit" name="addContact" value="Send"/&gt;
              &lt;/fieldset&gt; </code></pre>
  </div>
  </div>
   </p>