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

login from external site
Hi my new experience begins, Now what i am trying to do is i make three pages, login.php logout.php

Points for Wiki contribution
Hi everyone,

I want to know how long does it take for the moderator to award points for a

need help in php variable
i have a php variable on one page
Code: [Select]$lastId = mysql_insert_id($db);
echo $lastId;<

SuperCali PHP Event Calendar
does anyone have any experience with the SuperCali PHP Event Calendar? I could use some assistance

How to show next and prev records
Hi all,

Sorry if this is simple, i'm very new to php, well, any programming language actually

PHP error. Need help urgently
Hi,

I am programming a php site and have a problem that i just cant find out how to fix. When

Escape Latin Characters
I need to escape latin characters in an xml doc. Example: "é" is escaped to "é". I thoug

Two fgetcsv related questions ;D
First of im trying to get a file from a merchants server but the directory is protected, I know the

AJAX form submit
I recently built a form that submits data to my database with an ajax function that is called throug

Whats wrong with my query?
I am trying to get this query to show the appropriate ticked vehicle roof height, unless no boxs 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