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'] ;
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

Can you help please? Php file
I have to write this php file to allow users to register their nicknames on nickserv

For an I

$_GET problem
Hi all,

Have a bit of a problem with a little piece of code, I am not sure if this should be

Socket Server
In my following socket server, I am trying to listen to a connection through port 12345 in my web br

Multi dimensional arrays
If I put in this code:

1
2
3
4
5
6
7
8
9
10
11
12
13<

I need some help with the IF command...
I have a large number of images in one section of my website with the .jpg format. I'm adding a bun

Local file browser with php
Halo..

So this is what i want to create. I have a folder that i share and it has many movies.

pass form variables straight to email, no database required?
hello all,

im working on this form...

http://www.adobedayevents.com/project_request/pr

Timer control causing error
I recently decided to add a timer control to an existing page that uses AJAX on my site. As soon as

Deleting pointers froms vector?
Hi. I have a vector filled with pointers and I want to delete the pointers. I could do a loop and do

BB_Code error
I'm having a problem with a custom built function and keep getting this error:


Warning: M

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