User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the MySQL section within the Web Development category of DaniWeb, a massive community of 427,765 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,704 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our MySQL advertiser: Programming Forums
Views: 2152 | Replies: 1
Reply
Join Date: Mar 2006
Location: Montreal Quebec Canada
Posts: 52
Reputation: puddin is an unknown quantity at this point 
Rep Power: 3
Solved Threads: 0
puddin puddin is offline Offline
Junior Poster in Training

Help Mysql Php Image Help Please!!!

  #1  
May 23rd, 2006
Hello and a BIG Thank-You!!! To you who have helped me...

This I think will be my last image question. Okay the user uploaded a picture , it went to the (Photos directory) (Name and Type Show) Great!... Next to the (Mysql Database under aphoto_filename) Again with (Name and Type Showing) Excellent!, It is in the users Mysql Database listing with all their other information. So Perfect! Last it shows up Beautiful!

Brick Wall I'm exhausted even missed school trying to solve it, I cannot do that again.
PROBLEM TO BE SOLVED:

When the user leaves the photo view page, I cannot get their photo to stay reappear. It remains in the photos directory and in the mysql database... When I try calling it... It only displays the image name and type I need it to open.

Please See My Code Below and Thank A Zillion!


<?
include'db.php';

$sql_check = mysql_query("SELECT aphoto_filename FROM gallery_photos WHERE email_address='".($email_address)."'AND password='".($password)."'" );

$aphoto_filename = mysql_fetch_array($sql_check,
MYSQL_ASSOC); //MYSQL_ASSOC;
$sql_check_num = mysql_num_rows($sql_check);
if($sql_check_num == 0){

if ($type == "image/pjpeg") {
imagejpeg($img);
} else if ($type == "image/x-png") {
imagepng($img);
} else if ($type == "image/gif") {
imagegif($img);
}
$handle = fopen($aphoto_filename['tmp_name'], $images_dir."/$filename". "wb");

echo ("");
} else {
echo $aphoto_filename['aphoto_filename'];
}

?>

P.S I actually have... aphoto, bphoto, cphoto and dphoto ... When anyone wants to see the users photo I need the photos to open. Thanks again soooooo much, puddin
AddThis Social Bookmark Button
Reply With Quote  
Join Date: May 2006
Posts: 5
Reputation: VioletSite is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
VioletSite's Avatar
VioletSite VioletSite is offline Offline
Newbie Poster

Re: Mysql Php Image Help Please!!!

  #2  
May 27th, 2006
I'm not sure Pudd... but maybe your $sql_check_num is NOT equal to 0 anymore after the first page load; it would be 1, wouldn't it?

I hope this helps. Good luck to you!
"Those who know, don't need to be told. Those who don't; seldom listen." -- Ashida Kim

Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb MySQL Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Similar Threads
Other Threads in the MySQL Forum

All times are GMT -4. The time now is 1:09 pm.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC