Ok here's the situation;

I have these tables setup in MySQL;

Table name - Users
UserID - INT Primary key Auto increment
Password - VARCHAR
Firstname - VARCHAR

Table name - WallPosts
PostID - INT Primary key Auto increment
UserID - INT Foreign key
Comment - VARCHAR

Here's the problem -

The user logs in

The user uses a form to place a comment into the table 'WallPosts'

The comment shows up in the table

But the users UserID and Email do not show up in the table

How do I set a php script so that the script takes the logged in users Email and UserID and places them in the 'WallPosts' table along with the 'Comment' from the form?

Thanks in advance :)

If you have variables containing these values, then you need to include some hidden input variables (<input type=hidden ...) in your form and set the values to the variables with the email and userid. Your backend update will need to include these variables in the mysql insert.