I have a database named traveler. I have two tables in the database: requests and users with a primary field in each "request_id" and "user_id" respectively.
I want to be able to insert a record into the request table. I have my submission form and it works. In my form I select my user from a database menu which enters the "user_id" value.
After I insert my record I want to update the record and I have that form built as well. But here is my problem, I want to be able to automatically update my request record with additional information found in my users record (table). For instance I want the users email to be dropped into my request record.
So I think I should use an "if" statement something like "if user_id is then echo users.email into the requests.email field". I just don't know how to do this.
Please help. Hopefully I have explained this clearly enough. THANKs