By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,216 Members | 1,023 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,216 IT Pros & Developers. It's quick & easy.

script magicaly appears on my computer

tolkienarda
100+
P: 316
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_object($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
Feb 19 '07 #1
Share this question for a faster answer!
Share on Google+

Post your reply

Sign in to post your reply or Sign up for a free account.