# Php MySQL database help

**URL:** <https://forum.kirupa.com/t/php-mysql-database-help/648436>\
**Category:** web dev\
**Created:** [July 30, 2021, 11:50am UTC](https://forum.kirupa.com/t/php-mysql-database-help/648436 "2021-07-30T11:50:16Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![mukiria](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/mukiria/32/13440_2.png) [@mukiria](https://forum.kirupa.com/u/mukiria)\
**Post date:** [July 30, 2021, 11:50am UTC](https://forum.kirupa.com/t/php-mysql-database-help/648436/1 "2021-07-30T11:50:16Z")

</div>

I would like to create 3 dbs connected by foreign keys and have the end user input the data from one form  
Can anyone please help?

The dbs are client, work, and accessories

# Client
 \<?php $month = date('m'); $day = date('d'); $year = date('Y'); $today = $year . '-' . $month . '-' . $day; ?\> Select Options Option one Option two Option three Option four 

```
<h1>Work</h1>
<label>
	<input type="checkbox" name="work" value="one">One<br />
	<input type="checkbox" name="work" value="two">Two<br />
	<input type="checkbox" name="work" value="three">Three<br />
	<input type="checkbox" name="work" value="four">Four<br />
</label>

<h1>Accessories</h1>
<table class="table table-bordered">
<thead>
    <tr>
        <th></th>
        <th>Product Name</th>
        <th>Price</th>
        <th>Quantity</th>
    </tr>
</thead>
<tbody>
    <tr>
        <td><input type="checkbox" name="prodid[]" value="Car"></td>
        <td>Accessory One
            <input type="hidden" name="prodname[]" value="Car">
        </td>
        <td><input type="number" name="prod_price[]" class="form-control"></td>
        <td><input type="number" name="prod_qty[]" class="form-control"></td>
    </tr>
    <tr>
        <td><input type="checkbox" name="prodid[]" value="Bike"></td>
        <td>Accessory Two
            <input type="hidden" name="prodname[]" value="Bike">
        </td>
        <td><input type="number" name="prod_price[]" class="form-control"></td>
        <td><input type="number" name="prod_qty[]" class="form-control"></td>
    </tr>
    <tr>
        <td><input type="checkbox" name="prodid[]" value="Accessories"></td>
        <td>Accessory Three
            <input type="hidden" name="prodname[]" value="Accessories">
        </td>
        <td><input type="number" name="prod_price[]" class="form-control"></td>
        <td><input type="number" name="prod_qty[]" class="form-control"></td>
    </tr>
</tbody>

```

---

<div class="post-metadata">

**Author:** ![kirupa](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/kirupa/32/11616_2.png) [@kirupa](https://forum.kirupa.com/u/kirupa)\
**Post date:** [July 30, 2021, 5:10pm UTC](https://forum.kirupa.com/t/php-mysql-database-help/648436/2 "2021-07-30T17:10:25Z")

</div>

Unfortunately my PHP/MySQL knowledge has deteriorated over the years. The forums are more front-end focused these days, so you may have better luck posting someplace like StackOverflow instead for this topic 🙂
