hey guys, thanks for all the help so far, it still is giving me trouble...here is my code:
<?PHP
//defines location
$filedir = "c:/phpweb/userpics";
//check for jpeg image type
if($fupload_type =="image/pjpeg")
{
//copies picture to new directory and renames to username
if(copy($fupload,"$filedir/$CUserName.jpg"))
{
//adds 'yes' to database so user can search only profiles with pictures.
print ("Your picture has been uploaded correctly<BR><BR>");
print ("<img src=\"./$filedir/$CUserName.jpg\">");
print "<BR>Not satisfied with the picture? Here's some tips on improving your picture:<BR>
- ENTER TIP 1<BR>
- ENTER TIP 2<BR>
- ENTER TIP 3<BR>";
$query="UPDATE clients SET CPicture='yes' WHERE CUserName='$CUserName'";
if(!mysql_query($query))
{
print "A process has failed during the update. Please report this incident to the Web Master (INSERT EMAIL ADDRESS HERE)<BR><BR>";
return false;
}
return true;
}
die ("Error in uploading. Please try again");
}
I tried adding the ./ infront of the file..but no luck...The picture it self is renamed properly and is in the right folder. if you check the properties in the browers it says it there, just that it won't display it.
Ideas?