Answered
PHP/MySQL Record Insert question
I am working with which PHP 4.4.2, MySQL Server 5.0 running
on Apache 2.0.55, and I am developing my web-site with Dreamweaver
8. All of which is running locally on my machine.
I am working on a real-estate website that allows landlords around my local area to login to the web-site and add their apartment or housing rental units into a database that students that go to my small university can browse and search through. The landlords register through a form that loads into a 'landlords' table in the database and MySQL auto-increments an ID into a 'landlord_id' column which obviously assigns them their 'landlord_ID'.
My question is: When the landlord is filling out the form to add one of their rental units ( which loads into a separate table I called 'sites'), how can I make their 'landlord_id' (which resides in the 'landlords' table) be entered into the 'landlord_id' column in the 'sites' table for each site that they enter into the database?
I'm trying to do this because when the landlord first logs in, I'm going to have a dynamic table that displays all of the sites they already have entered in the database, and only displays their sites that they have already entered in by only displaying the sites that have their 'landlord_id' in the site record.
Thanks so much for your help, and if I'm being confusing at all, please reply or email me so I can clarify.
I am working on a real-estate website that allows landlords around my local area to login to the web-site and add their apartment or housing rental units into a database that students that go to my small university can browse and search through. The landlords register through a form that loads into a 'landlords' table in the database and MySQL auto-increments an ID into a 'landlord_id' column which obviously assigns them their 'landlord_ID'.
My question is: When the landlord is filling out the form to add one of their rental units ( which loads into a separate table I called 'sites'), how can I make their 'landlord_id' (which resides in the 'landlords' table) be entered into the 'landlord_id' column in the 'sites' table for each site that they enter into the database?
I'm trying to do this because when the landlord first logs in, I'm going to have a dynamic table that displays all of the sites they already have entered in the database, and only displays their sites that they have already entered in by only displaying the sites that have their 'landlord_id' in the site record.
Thanks so much for your help, and if I'm being confusing at all, please reply or email me so I can clarify.