hi all
i sat down for work this morning to get my image uploader done and when i opened my image printer i found my script was gone and a nice neat fully commented code was there in it's place i have no idea where it came from, i didn't write it cause i don't know what some of the code does and i have certain variable naming conventions i follow for my own ease like never using caps. but this code is full of capitlized letters. AHHHHH! i am so confused here is the self generating code
[PHP]
$result = "SELECT imgdata, type FROM pix WHERE title='$title'" ;
$Show = mysql ( $hDB, $hSQL );
$rows = mysql_num_rows( $hShow);
if($rows<1){
// no image matches this query
}
else{
// at least one image has this title
$getPhoto = mysql_fetch_obj ect($Show);
// we need to determine the mime type
$Type = $getPhoto->type;
// and send the correct header to the browser
Header("Content-type: $Type");
// now send the image
$Body = $getPhoto->body;
echo $Body;
flush();
}
[/PHP]
has anything crazy like this ever happened to anyone else
eric
i sat down for work this morning to get my image uploader done and when i opened my image printer i found my script was gone and a nice neat fully commented code was there in it's place i have no idea where it came from, i didn't write it cause i don't know what some of the code does and i have certain variable naming conventions i follow for my own ease like never using caps. but this code is full of capitlized letters. AHHHHH! i am so confused here is the self generating code
[PHP]
$result = "SELECT imgdata, type FROM pix WHERE title='$title'" ;
$Show = mysql ( $hDB, $hSQL );
$rows = mysql_num_rows( $hShow);
if($rows<1){
// no image matches this query
}
else{
// at least one image has this title
$getPhoto = mysql_fetch_obj ect($Show);
// we need to determine the mime type
$Type = $getPhoto->type;
// and send the correct header to the browser
Header("Content-type: $Type");
// now send the image
$Body = $getPhoto->body;
echo $Body;
flush();
}
[/PHP]
has anything crazy like this ever happened to anyone else
eric