| | |
Mysql Php Image Help Please!!!
Please support our MySQL advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
•
•
Join Date: Mar 2006
Posts: 52
Reputation:
Solved Threads: 0
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
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
![]() |
Similar Threads
- php/mysql configuration? queries do not return anything. (PHP)
- Job wanted - mysql,php,phpbb2 expert, payed wanted (Web Development Job Offers)
- How do I install Apache, MySQL, PHP on Linux? (PHP)
- [JOB] MySQL/PHP Engineer, Los Angeles, CA (Web Development Job Offers)
- Experience the FASTEST MySQL and PHP Hosting | Starting @ $2.50 per month (Web Hosting Deals)
- FASTEST MySQL and PHP Hosting, [Seeing is Believing] 75% OFF On Any Plan (Web Hosting Deals)
- Hardware Requirements for Fedora, Apache, MySQL and PHP on one machine (*nix Hardware Configuration)
- MySQL and PHP hosting (Linux Servers and Apache)
Other Threads in the MySQL Forum
- Previous Thread: user table in my database
- Next Thread: database structure - boohooo help me
| Thread Tools | Search this Thread |
agplv3 alfresco amazon api aws bizspark breathalyzer changingprices cmg communityjournalism contentmanagement contractors copyright count court crm database design developer development distinct drupal dui ec2 email enterprise eudora facebook form foss gartner gnu government gpl greenit groklaw groupware hiring hyperic images innerjoins insert ip joebrockmeier join journalism keyword keywords kickfire laptop law legal license licensing linux maintenance managing mariadb matchingcolumns metron micromanage microsoft microsoftexchange mindtouch montywidenius mozilla multiple mysql mysqlcolumnupdating mysqldatetimeordermax() mysqlindex mysqlinternalqueries mysqlquery mysqlsearch news open-xchange opendatabasealliance opengovernment opensource oracle penelope php priceupdating query referencedesign reorderingcolumns resultset saas select sharepoint simpledb sourcecode spotify sql sugarcrm syntax techsupport thunderbird transparency virtualization





