Kind of a n00b here.
on my main table (users) i named a column as "id", set it to auto-increment and as the primary key and created it like this:
CREATE TABLE `users` (
`id` int(20) NOT NULL auto_increment,
`full_name` varchar(200) collate latin1_general_ci NOT NULL default '',
`user_name` varchar(200) collate latin1_general_ci NOT NULL default '',
`user_pwd` varchar(200) collate latin1_general_ci NOT NULL default '',
`user_email` varchar(200) collate latin1_general_ci NOT NULL default '',
`activation_code` int(10) NOT NULL default '0',
`joined` date NOT NULL default '0000-00-00',
`country` varchar(100) collate latin1_general_ci NOT NULL default '',
`user_activated` int(1) NOT NULL default '0',
PRIMARY KEY (`id`)
)
On the second table i created it like this:
CREATE TABLE about_me
(
about_id int NOT NULL,
nick_name varchar(255),
descript varchar(255),
aim varchar(255),
cell varchar(255),
school varchar(255),
music varchar(255),
aspire varchar(255),
City varchar(255),
id int,
PRIMARY KEY (about_id),
FOREIGN KEY (id) REFERENCES users(id)
)
I believe i imported the key correctly into my new table (about_me).
Well I expected the id column to cascade down into this new table automatically which it didn't. RIght now if you log into my site and use the about me form, it posts to the new table "about_me" but it doesn't identify the user on the table with the primary key assigned to him from the first table (users). How do I use PHP sessions to identify the user by his/her id from the primary key in the table.
I attached the whole site. The php for the log in is a prefab and I'm attempting to do the about me part on my own, I'm having alot of trouble with the whole sessions thing.
I'm not really sure if I'm doing this correctly. so yeah any point in the right direction would be awesome!
-Mike
[attachment deleted by admin]