Data Assist - Issue creating unique profile pages for users
I have created a social networking site using Data assist which allows people to upload images, videos, etc... To the site which can be viewed by the public in a gallery. The system has been built using multiple database tables. However I have run into an Issue.
I am struggling to set up profile pages.
When a person views an image detail page from an Image database table, they have an option to click on the user’s username and be redirected to that users profile page where information from another user database table needs to show. (First, Last Name, etc...)
In this system I am trying to combine two database tables, I need the system to show the right users profile according to which username has been selected in the image gallery, and then display that users information from another database table.
So Far I have achieved:
I have used a user registration system database table and an image database table in this instance.
I have used both the registration table for the creation of users and profile pages. When a person registers with the site, it creates a record in the table,
Once the user is logged in they are able to access a "Set up profile" page, (an update data assist page), which updates certain fields in the record, which the profile page needs to show.
So far, people can create their profile page, the information inserts in the table fine, however I cannot show the right information for the write profile page,
To link the detail pages to the profile page I have used the following link
../PublicPhotosProfilePages/PublicPhotosProfilePage.php?CustID=<?php echo(rawurlencode($row_WADAimagetable['CustID'])); ?>
Then in the profile page I have created two record sets, One for the image table, the other for the user table.
I inserted a text field which dynamically show the users user name from the session variable brought from the detail page,
A cookie from “Cookies tool kit” which dynamically picks up the users ID from the image table.
<?php echo $row_WADAimagetable['UserID']; ?>
And then I filter the users database table record set off the cookie I created.
However this does not seem to work. Sometimes information shows sometimes for the wrong user and other times not at all.
Please tell me what I am doing wrong.
Thanks in advance!