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

modifying query string with no page refresh
Hi everybody,
I've tried to get info about my problem all over the internet but i didn't find out

pagination - need help on passing of search query.
Hi, i have been trying for days but couldn't get this sorted out. Would like some professional help

PHP error (line 38) my website
Hello everyone, I'm new on this
and I got a web site thats got a error not showing the photos on<

Relative path
I have a absolute path to an image - like so: C:/Program Files/Apache Software Foundation/Apache2.2/

extract a file from zip file
hi,
i know how to unzip a zip file in php, but is there a way to just extract a certain file only

Need help: how to catch acess of undefined class properties
Hello. I am learning OO with PHP and have hit a problem.
Some code runs as perfectly valid code,

Inserting into MySQL Newbie
Hi ive got a slight problem where ive made a simple web form where the customer inserts the ammount

Table trouble
i have been reading the forum for a few weeks and decided to join. i like the format and the advice

help with image upload code
Hello,

right now this code I have resizes images and then places them into the uploads folder

Load Animated Image while cache is serve
I have a page that loads up using cache and took about 1 to 2 minutes before it loads to the page. <

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