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

help countdown timers
hello every one,

I'd like to know how to insert many countdowns in the same page.
The dura

I need help with formatting date from mysql! with php!
Hello guys

*Note: this is a php question not MySQL question, please do not move it to mysql s

Displaying Site Logo/Icon on a Title tag
really need some help out here. I want to insert a Logo/Icon just like the one close to the "PH

Limiting uploaded file type
Hi. First post here
I am working on a simple upload script, and I need it to limit the allowed f

strtotime issue
Hey all,

I'm playing around with some code, and basically the idea is:

Person changes

Navigation include for all site directories
Hi,

I need a navigation include that can deal with directories at different levels on a site.

Place specific image in html page when specific name is typed.
Hello,

Fairly new to PHP and was curious if someone might know how to solve a fairly simple r

media recovery
Hi,
i startup the database i got the error

SQL> startup
ORACLE instance started.

Firewall / visited websites logger
Hi. I have a firewall implementation and I want to log all the websites visited on the machine. S

How to disable direct access to a file
Suppose I've 2 Files. 1.php & 2.php

I don't want anybody to access 2.php directly fr

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