Re: [PHP] Repost URGENT: Can't see picture!!!!!!!!

2001-03-19 Thread Jason Stechschulte

On Sat, Mar 17, 2001 at 01:16:16AM -0700, Mike Yuen wrote:
 
 Hi, this is a repost and nothing i've tried is working.  Basically, I
 allow people to upload pictures and they all go to the proper
 directories but I can't see the picture.  I can see the pictures great
 on my windows server but no one else can see it.  Obviously the path to
 the images is screwed but I can't figure it out.  The $picdir i've tried
 are:
 $picdir = "./userpics";
 $picdir = "c:/phpweb/userpics/"
 $picdir = "/userpics";
 $picdir = "../userpics";
 All of the above don't work.   I'll post my code below:

The directory is probably not viewable from the web.  Try putting the
folder somewhere in the web tree.

-- 
Jason Stechschulte
[EMAIL PROTECTED]
--
No, that'd be silly.
 -- Larry Wall in [EMAIL PROTECTED]

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Repost URGENT: Can't see picture!!!!!!!!

2001-03-17 Thread Mike Yuen


Hi, this is a repost and nothing i've tried is working.  Basically, I
allow people to upload pictures and they all go to the proper
directories but I can't see the picture.  I can see the pictures great
on my windows server but no one else can see it.  Obviously the path to
the images is screwed but I can't figure it out.  The $picdir i've tried
are:
$picdir = "./userpics";
$picdir = "c:/phpweb/userpics/"
$picdir = "/userpics";
$picdir = "../userpics";
All of the above don't work.   I'll post my code below:

?PHP
session_start();
include("dblib.inc");
?
!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"
html
head
 titleUploading your potrait/title
 Link href="arial.css" rel=stylesheet title=arial type=text/css

body
img src="pics/logo.gif"
BR
H3Portrait Picture/h3
?PHP
//defines location
$filedir = "c:/phpweb/userpics";
$picdir = "./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"))
  {
  print ("BHey Goodlooking!  Your picture has been uploaded
correctly/bBRBR");
  print "table border=1
  TR
   TD height=\"300\" width=\"300\" align=\"center\"";
   print ("img src=\"$picdir/$CUserName.jpg\"");
  print"/td
  /tr/table";
  print "BRBa href=\"memberprofile.php?$PHPSESSID\"Home/a/b";
  print " Ba href=\"fupload.php\"Upload again/a/bBR";
  //adds 'yes' to database so user can search only profiles with
pictures.
  $query="UPDATE clients SET CPicture='yes' WHERE
CUserName='$CUserName'";
  //FAILED PROCESS
  if(!mysql_query($query))
   {
   print "A process has failed during the update.  Please report this
incident to the Web Master a
href=\"mailto:[EMAIL PROTECTED]\"[EMAIL PROTECTED]/aBRBR";
   print "BRBa href=\"memberprofile.php?$PHPSESSID\"Home/a/b";

   return false;
   }
  return true;
  }
 die ("Error in uploading. Please try again");

 }
else
 {
 //PRINTS IF PICTURE IS ANYTHING BUT JPEG FORMAT
 print "In order to show off your qualities to the fullest extent.BR
LDSAlberta.com currently only acceptes pictures in JPEG format which
have the highest color quality and in turn show you off the best!";
 print "BRBa href=\"memberprofile.php?$PHPSESSID\"Home/a/b";
 print " Ba href=\"fupload.php\"Upload again/a/bBR";
 }
unlink($fupload);
mysql_close();
?
/body
/html



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]