# Is this even possiable?

**URL:** <https://www.phphelp.com/t/is-this-even-possiable/33044>\
**Category:** MySQL database\
**Created:** [January 20, 2021, 6:27pm UTC](https://www.phphelp.com/t/is-this-even-possiable/33044 "2021-01-20T18:27:48Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rattler58](https://www.phphelp.com/letter_avatar_proxy/v4/letter/r/a9a28c/32.png) [@Rattler58](https://www.phphelp.com/u/Rattler58)\
**Post date:** [January 20, 2021, 6:27pm UTC](https://www.phphelp.com/t/is-this-even-possiable/33044/1 "2021-01-20T18:27:48Z")

</div>

INSERT INTO table2 (column1, column2, column3, …)  
VALUES ($var1, $var2, $var3,…)  
SELECT id,  
FROM table1  
WHERE id = $var3;

Is this even possible? I want the user to enter his data  
from a form. Let him select a organization from a drop down box.  
Pass that id to his record. Do a select record of organization  
name from that table and then print or use the org name not the org id.  
I will store the org id in the user record to retrieve as needed.

---

<div class="post-metadata">

**Author:** ![ErnieAlex](https://www.phphelp.com/letter_avatar_proxy/v4/letter/e/bc8723/32.png) [@ErnieAlex](https://www.phphelp.com/u/ErnieAlex)\
**Post date:** [January 20, 2021, 6:31pm UTC](https://www.phphelp.com/t/is-this-even-possiable/33044/2 "2021-01-20T18:31:47Z")

</div>

Yes and no. Since a user gets logged into your system and therefore has a user ID, you would want to have other things like an organization name as a separate function. You can add a field to your database table and save the organization id there as the user’s default one. But, not in the manner you posted.  
You would want to first get the id of the organization from the drop-down. Then, use it to save as needed.  
The organization drop-down would include the id of the organization. Then, it can be saved as needed.  
Hope that helps…

---

<div class="post-metadata">

**Author:** ![skawid](https://www.phphelp.com/letter_avatar_proxy/v4/letter/s/bbe5ce/32.png) [@skawid](https://www.phphelp.com/u/skawid)\
**Post date:** [January 21, 2021, 10:14am UTC](https://www.phphelp.com/t/is-this-even-possiable/33044/3 "2021-01-21T10:14:03Z")

</div>

Yes, it’s possible. Where abouts in the process are you struggling?
