Hi Guys

I am trying to build a small CMS. One of the features is the ability for users to add a Flickr URL of one of their Flickr albums so it's then embedded in their profile.

So I have a field in the users db called flickr_url. I have a text box in a form where the user enters their flickr URL. I then use an embedded URL in an iFrame on the profile page. This is hard coded and static, so every user sees the same album. This code works.

<iframe align="center" src="http://www.flickr.com/slideShow/index.gne?group_id=&user_id=<user_id>&set_id=<set_id>=" frameBorder="0" width="500" height="500" scrolling="no"></iframe>

But I want the embedded link to be dynamic for each users profile. This is the code I have written.

<?php

//$query = "SELECT flickr_url FROM users WHERE user_id = '" . $_SESSION['user_id'] . "'";"
$result = mysqli_query ($dbc, 'SELECT flickr_url FROM users WHERE user_id = "'.$_SESSION['user_id'] .'"');
$flickr_url = mysqli_fetch_array($result);
echo '<iframe align="center" src='.$flickr_url.'frameBorder="0" width="500" height="500" scrolling="no"></iframe><br/>';
?>

When I run this code, I get the users profile page as normal but where the album normally appears I see a :
Access forbidden!

You don't have permission to access the requested object. It is either read-protected or not readable by the server.

Can anyone help me with my code to get this working? I am quite new to this so I have probably made a stupid mistake. I dont know if this can only be done using the Flickr API. Thanks for anyone who takes the time to help me. I really appreciate it.

regards

this was resolved with the following:

<?php

echo '<iframe align="center" src="'. $flickr_url[0] .'" frameBorder="0"
width="500" height="500" scrolling="no"></iframe><br/>';

?>
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.