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

PHP Multiples of 2, Show posts...not working (wordpress)
I have been using this code to show div.example with 6 li columns inside it, each li is a post with

am I using this for loop correctly
Dear buddies!

Right now I am generating a report with some details for all the dealers.

Update data to upper case in parent/child tables
Hi Gurus!

In production we have a product table and which is being reference by many tabl

selectbox+database connection retrive problem
Code: [Select]
<tr>
<th align="left" scope="c

Display the user's weight lost in the past week
Hello everyone,

I am working on a weight loss app for my site, and I want to display the user

Xml parsing
I need a suggestion about parsing xml with multiply parts like pervious...
i.e. different device

why preg_match_all does not return the number of matches
My regex looks like

X[^x{4e00}-x{9fa5}]*Y

(where X and Y are two Chinese characters)

preg_match logical error
Code: <?php
$s = file_get_contents("page.html");
preg_match('/<div cla

Help uploading .JPG
I have a problem with upload images when the ending is .JPG capitalized.. I really don't know what c

PHP Blog help
Need help with posting comments in a word press blog? I have a comments page where the comments are

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