vincentas — 2013-01-25T06:24:21-05:00 — #1
I´m trying to make an integration with php and sql.
I have a static webpage (html), with many hyperlinked image thumbs.
I need each thumb to show in a new page with a description associated with the image, and the same image (bigger).
I believe this isn't very hard, but for me is impossible to achieve without help building the database and all the php script needed..
serenarules — 2013-01-25T07:28:50-05:00 — #2
There are a few steps involved, and a few decisions to make.
1) Uploading the base image.
2) Creating a thumbnail. Here you will want to keep both the original and the new thumbnail.
3) Saving to db. You have two choices here: move the images to a new folder and save the paths in the db or save the raw binary data. I can't say which is better for you.
3a) Saving the path.
*let me know which storage system you will be using, as well as which php wrappers, and one of us can assist you in the actual SQL code.
3b) Saving the bytes.
$data = file_get_contents('path/to/image.jpg');
$data = base64_encode($data);
vincentas — 2013-01-25T08:30:34-05:00 — #3