close ad
Databridge V2 with MySQLi support IS Now Available!
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Data Assist - Issue creating unique profile pages for users

Thread began 11/26/2010 4:59 pm by hbibizadeh396670 | Last modified 11/30/2010 8:12 pm by Jason Byrnes | 3112 views | 12 replies |

hbibizadeh396670

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!

Sign in to reply to this post

Jason ByrnesWebAssist

When a user logs in, the user ID is stored in a session variable.

When the profile ios created, you should be using this session variable as the users ID.


You should also be using that session variable to filter the recordsets. That session variable is the link to the users unique ID.

Sign in to reply to this post

hbibizadeh396670

Thanks for the reply but I think you might have miss understood what I am trying to do.

I am not trying to show the logged in users ID but other people profiles.

You see I have created a social networking site where people upload images, videos, etc...

What I have made is an area where people see all the results uploaded to the site by all site users.

When a person selects one result and goes to the detail page, they have the option to click on the uploader of the file being viewed and visit there Profile page which contains the information of that or another user.

I think if I use the session variable of the profile page, the person would only see their own information, which is not what I am trying to do.

Thanks in advance

Sign in to reply to this post

hbibizadeh396670

is this possible

Sign in to reply to this post

hbibizadeh396670

Very similar to the way people see youtube profile pages

Sign in to reply to this post

Jason ByrnesWebAssist

i think the issue is in using the cookie.



your link to the detail page aleady passes the user id as the CustID querystring variable

PublicPhotosProfilePages/PublicPhotosProfilePage.php?CustID=<?php echo(rawurlencode($row_WADAimagetable['CustID'])); ?>


just use that querystring variable for filtering the recordsets.

Sign in to reply to this post

hbibizadeh396670

To try and make it work, I have created a new profile page. The pages has two record sets. One for the users table and another for the image table.

I have tryied to filter the user ID from both recorsets usinng the session variable of Cust ID "imagetable_CustID" and the "UserID" which is avalible.

After this I select the fields in the user table and insert them to the page.

When I run the system, I just get a blank page.

What is wrong?

Sign in to reply to this post

Jason ByrnesWebAssist

dont use the session variable.

use the CustID query-string variable.
when a page displays blank, it means a php error is occurring but error reporting is turned off.


add the following code at line 1 to turn error reporting on:

php:
<?php

error_reporting
(E_ALL);
ini_set('display_errors','on');
?>
Sign in to reply to this post

hbibizadeh396670

Ok I did that but I dont get any errors

I dont know how to add CustID query-string variable

I have uploaded the profile page to see if you require

Attached Files
ForumPost.zip
Sign in to reply to this post

hbibizadeh396670

Actually I have been trying different things and I think I have got the error

Warning: mysql_free_result(): 4 is not a valid MySQL result resource in C:\wamp\www\KittyCatSpace\PublicPhotosProfilePages\PublicPhotosProfilePage.php on line 252

Warning: mysql_free_result(): 5 is not a valid MySQL result resource in C:\wamp\www\KittyCatSpace\PublicPhotosProfilePages\PublicPhotosProfilePage.php on line 254


Not sure what this means

Sign in to reply to this post
loading

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...