Displaying pictures


Posted on 16th Feb 2014 07:03 pm by admin

i have worked my way through storing images in directory and storing the location in mySQL db.Now i was trying to make a Image gallery for just that particular user who had uploaded those images. i am having problem with that.
Code: <?php
session_start();
$username = $_SESSION['UserName'] ;
Did you know?Explore Trending and Topic pages for more stories like this.
echo "Username : ".$username."<br/><br/>";
$user=$username;//storing session in another variable
include('dbconnect.php');//Conncetion to Database

$qry = "SELECT * FROM UserImage WHERE UserName = '$user' ";
$result = mysql_query($qry,$connection);
$result2 = mysql_num_rows($result);
if($result2 == 0)
{die('Username does not exist.');}
else{

[b]/////I need help here.how do i make all those images display here[/b]


}

}
?>
No comments posted yet

Your Answer:

Login to answer
289 Like 18 Dislike
Previous forums Next forums
Other forums

Read from forum
Haven't written anything forever and I would like to get back.
What I'm trying to do is getting t

Run function every 5 mins ??
I have a function PostMessage()

How can I run it every 5 mins ??

check comment for html
hi, I just wanted to check if a comment a user posts contains HTML, and if it does, to not allow it

Oracle Connectivity
Hi Every One,

Can we access SAP from oracle database.If it possible then please spec

$_FILES array
Ok,

I just started experimenting with PHP today. My goal right now is to have people be able

how to transport the Query and insfoset
Hi

I have created the query using SQ01........
How to created T-code for query..

paginate search result
Hi, I have a paginations script to display data from my database but i would like to paginate someon

Multidimensional array problems in $_POST
I'm having trouble with a three-dimensional $_POST array. It starts as a two-dimensional array on th

How do I create a 2D game "camera" to follow player?
In J2ME programming I'm targeting MIDP 2.0 devices.

I'm using gamecanvas and I was thinking t

split values
I have values that are returned to me in this format:

name=>test,age=>49

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash