Current location: Hot Scripts Forums » Programming Languages » PHP » Photo Gallery


Photo Gallery

Reply
  #1 (permalink)  
Old 12-16-04, 10:30 PM
dwoody dwoody is offline
Newbie Coder
 
Join Date: Jul 2004
Posts: 48
Thanks: 0
Thanked 0 Times in 0 Posts
Photo Gallery

I am making a photo album for my site and I am pretty new to php and mySQL. I would like to upload the photos into a mySQL database. I was just wondering if someone would show me the script for handleing an image (jpg is fine for now) from an HTML form by saving it and inserting it into the database. I will probably need help trying to view the image later but for now i just want to get the uploading into the DB working.

thanx alot guys
Reply With Quote
  #2 (permalink)  
Old 12-17-04, 02:11 AM
greybird greybird is offline
Newbie Coder
 
Join Date: Dec 2004
Posts: 44
Thanks: 0
Thanked 0 Times in 0 Posts
Check out some of the scripts ive written for this kind of thing:

http://www.redvodkajelly.com/code/

There is a class for uploading files and...i think...one for maniplating the image if you need to do that - create thumbnails and such. I always tend to save the images in a database as a longtext field and insert the picture as a base64 encoded version of the file:

PHP Code:

$file "path/to/the/tmp/image";

$data base64_encode(fread(fopen($file'r'), filesize($file))); 
mysql_query("INSERT INTO table VALUES ......."); 
etc.
Reply With Quote
  #3 (permalink)  
Old 12-31-04, 11:56 PM
loewydesign loewydesign is offline
New Member
 
Join Date: Dec 2004
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Greybird,

Maybe you or others might know of a simple photo gallery script that also includes a eamil this photo to a friend feature. Similar to this gallery:
http://www.southflorida.com/news/sfl...a.photogallery.

I'd like a simple gallery and do not require the options for viewers to rate or comment on a photo. I love the simplicity of this web album:
http://www.ornj.net/software/webalbum/sample1/
But it doesn't have that email photo to a friend option.

I'm more of a visual designer and looking to commission a programmer to set this up for us.

Thanks
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
PHP Photo Gallery rockitdev PHP 0 12-06-04 07:45 AM
Needed: Extremely Customizeable Photo Gallery xiplok Script Requests 1 07-22-04 02:26 PM
photo gallery w/formfields for each thumbnail mikeyzc PHP 2 05-28-04 01:16 PM
photo gallery w/form fields for each thumbnail mikeyzc Script Requests 0 05-28-04 06:48 AM
Seeking for a simple photo gallery script... Sgrebs PHP 0 10-27-03 02:00 PM


All times are GMT -5. The time now is 05:19 AM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.