Justtechjobs.com Find a programming school near you






Online Campus Both


php-general | 2001072

[PHP] Data from SQL to a string in a useable format From: Jason Bell (jbell <email protected>)
Date: 07/17/01

How can I pull my data from my SQL db, and store it as a string so that it can be used? Specificly, I'm working with images.

When the images are stored in the database, the only pre-processing that is done is:

$img = addslashes(fread(fopen($userfile, "r"), filesize($userfile)));

(* note: $userfile is the file identifier from my upload form.)

I want to pull the data out of the database and store it in a string, so that I can use imagecopyresampled to create a thumbnail, but I just can't seem to get it to work....

please help!!!!!!

Thanks, Jason