Well, what I've got going on is this:
- User creates a profile with data and a profile image.
- The PHP script stores the data normally, but
- I get an error when it goes to store the image.
Here's my (non-working) script:
$data = addslashes(fread(fopen($form_data, "r"), filesize($form_data)));
$sql = "INSERT INTO bands (band_name, band_contact, band_type, band_locale, band_site, band_myspace, band_password, data,filename,filesize,filetype) VALUES ('$band_name','$band_contact','$band_type','$band_locale','$band_site','$band_myspace','$band_password','$data','$form_data_name','$form_data_size','$form_data_type')";
$bid = mysql_insert_id();
The error is being generated on the $data line because it works fine when that line is commented out.
Basically, I'd like to store that image on that row along with the rest of the data then call it in when viewing that users profile.
Your previous post had code in it, will this work?