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

DYNPRO_FIELD_CONVERSION
Hi gurus,

I got a dump when I run one of my program. the dump is described below:

SCRIPT ERROR
Here is the CONTACT FORM I made for our website:

<form id="form1" name="

Seperate team from score
I am writing a site that does a NFL Pick 'em type application and I have a feed that gives me the sc

Running a cron job through PHP/Apache?!
Hello all,
I have a PHP script which makes a cron file from user input. When i try to run the cro

MySQL noob question
hi guys

I have a simple mysql table set up, along the lines of

Col 1 - Col 2 - Date_l

need help to creat database
Hello Team, please guys i am stuck from three days with paypal issue for IPN but no luck yet now i w

Why doesn't this work? (SSH2)
This is my script:

Code: <?php
$connection = ssh2_connect('213.251.167.109', 22);

why is it over writing
Code: $filepaths[] = $_FILES['new_image'];
foreach ($filepaths as $filepath)
{
$imagename =

Return X values where an ID number doesnt matter
Well as for subject heading, thats the best i could think of.

Currently im having a problem w

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

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