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

checkbox update
I am having a brain fart right now and i cant remember how to do this. if anyone could help that wou

convert static html data into dynamic
hi all

i need to convert a website which has static above 2000 articles into dynamic and add

Final year project, please point me in the right direction
hi there for my final year project I'm aiming to build a php script shell to use as an expert system

How to submit a form to the same page?
I have a table containing information about books in my library and this table has the following col

image upload, resize THEN submit form
Ok so I have a form that requires the user to upload an image, and then do something with that image

reading partial code from external site
Hi,

I am trying to write a script for my website to get an article from an external website.

Add User script "Could not execute query"
This should be an easy script but I can't get it to run. Can someone please help me?

<

Floating Point Precision Loss
I'm writing a program to draw a three-dimensional cube (with a corner cut off) without using any 3D

Get value from Select menu
Hi!

Have tried to find the solution on the web. Don't know if there is an easy one. A descrip

Hyperlink is adding an extra gap to variable
Hi, here's my problem..

I have a php generated page with a hyperlink which opens in a new win

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