the session from the profile age is named "id" if you dont see the id session variable listed in the Bindings Panel in the session section, you can create it:
go to Window -> Bindings to open the bindings panel
Click the Plus button to add a new binding
Select Session Variable and set the name to "id" (without the quotes, of course).
In the petdata table, you should have a user ID column that will be used as a foreign key column to relate each new record to the user that creates the record. this user ID column will get the value from the id session variable.
you have had a few questions about getting data from related tables, creating join queries, and I can see one flaw to your database design that is going to cause a lot of confusion for you, it actually already has.
In all of your tables you are naming the Primary key Column as "id". this can be confusing for a few reasons:
1) SecurityAssist uses the name of the id column to create the users id session variable. This has been created as "id" which is not a very informative session variable name, it does not tell you what the session variables job is.
2) you have to look at the table name to knwo which ID your referring to. you have already run into this issue in another thread where you where getting ambiguous column name error.
it is a better practice to use unique names for your columns in each table.
the naming convention I use when creating a new table is to include the table name in each column name. for example, if i am creating a new table name "users", i create all columns using "user" as a prefix:
userID
userFirstName
userLastName
userEmail
userPass
this way I have a unique name for every column in my database, the userID value will be stored in a session named userID, I will have be able to tell what the session is for at a glance and not have to keep track of it throughout the development process.