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

search function
HI guys,

if anyone could point us in the right direction of how to do this, or provide some t

Ball movement
I want to move a ball from one point to another and it should hit a group of balls at the other end

PHP SUBMIT
Code: <input name="doLogin" type="image" src="images/loginsubmit.jpg

how to insert value
I am having file bookissueadd.php..... in which i am having tag

<td height="21&q

if else problem, help please
i have this script that i made only i try to also put in a if else for for some reason the script is

constructor ?
i have written this program and made 3 constructors in the class and i want to call them in the main

While Problem
i am having a problem with a while statement here is the code
Code: [Select]<?php
sess

Multiple Dropdown Selections
I have a form that let's a user insert a page with the ability to select categories. I want them to

a dificult string search
Hi I don't know a way around this. I want the user to input a password, but to make it a bit complca

Passing vars to the DB
I have 3 small testing tables:

ID TYPE
1 pepperoni
2 C. bacon
3 taco

ID TY

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