Good job posting your username, password and server IP. I just logged into
your database. Change your password immediately.
> -Original Message-
> From: John [mailto:[EMAIL PROTECTED]
> Sent: Friday, April 04, 2003 10:12 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP-DB] Permission Denied; Upload
>
>
> Thanking in advance,
>
> Hi all- very new to php, and at the risk of being "spoon fed"
> here, I beg for your patience in advance. I am trying to have an
> entry page for user input/ pic upload into MySQL/win2k
> (www.sammiesmodels.com/entry.php ).
>
> I get this error during test of the above page: Warning: Unable
> to open '' for reading: Permission denied in
> C:\SammiWWW\entry.php on line 27 Couldn't copy the file!
>
> The upload folder, "Temp" sits in the root www dir, and the user
> has all permissions granted (or do i?) in the DB. Below is the
> syntax to the "Entry" page:
>
> ***
>
>
> Portfolio Entry
>
>
>
>
> if ($submit) {
>
> $db=mysql_connect("66.220.69.20","admin","snoddy");
> mysql_select_db("sammies models",$db);
> $sql="INSERT INTO models (first, last, age, email, location,
> eye, hair, experience, aspirations, mtype, picname1, picname2,
> picname3, picname4, picname5, picname6, picname7, picname8)
> VALUES
> ('$first','$last','$age','$email','$location','$eye','$hair','$exp
> erience','$aspirations','$mtype','$picname1','$picname2','$picname
> 3','$picname4','$picname5','$picname6','$picname7','$picname8')";
> mysql_query($sql) or die(mysql_error());
>
> // if $_FILES['img1'] isn't empty, try to copy the file
> if ($_FILES['picname1'] != "") {
>
> // copy the file to a directory or
> //die and print an error message
>
> // NOTE! if you're on a Windows machine,
> // use Windows pathnames, like so:
> // copy($_FILES[picname1][$first],
> "C:\\sammiwww\\directory\\path\\".$_POST[img1_name]);
>
> copy($_FILES['picname1']['$first . temp'],
> "C:\\sammiwww\\upload\\".$_FILES['picname1']['$first'])
> or die("Couldn't copy the file!");
>
> } else {
>
> // if $_FILES['picname1'] was empty, die and let us know why
> die("No input file specified");
>
> }
>
> ?>
>
>
> echo "First: $first\n";
> echo "Last: $last\n";
> echo "Age: $age\n";
> echo "Email: $email\n";
> echo "Location: $location\n";
> echo "Eye color: $eye\n";
> echo "Hair color: $hair\n";
> echo "Experience: $experience\n";
> echo "Aspirations: $aspirations\n";
> echo "Media Type: $mtype\n";
> echo "Photo 1: $picname1\n";
> echo "\n";
> echo "Photo 2: $picname2\n";
> echo "\n";
> echo "Photo 3: $picname3\n";
> echo "\n";
> echo "Photo 4: $picname4\n";
> echo "\n";
> echo "Photo 5: $picname5\n";
> echo "\n";
> echo "Photo 6: $picname6\n";
> echo "\n";
> echo "Photo 7: $picname7\n";
> echo "\n";
> echo "Photo 8: $picname8\n";
> echo "\n";
> echo "Thank you for registering, $first
> ";
> ?>
>
>
> http://www.sammiesmodels.com"; target="_self">Return to
> Sammies Models
> Home
> // display form
> else {
> ?>
>
>
> Submit Your Portfolio
> Here:
>
> action="">
>
>
>
> First Name:
> maxlength="45">
>
>
>
> Last Name:
>
> *Last name shall
> not be used on the website, but
>
>
> Age:
>
> for internal use
> only.
>
>
> Email:
>
>
>
>
> Location:
> maxlength="60">
> *Location- please
> do not be specific, but only
>
>
> Eye Color
>
> state or region.
>
>
> Hair Color:
> maxlength="45">
>
>
>
> Experience:
> id="experience">
> *
> Any experience pertaining to your talent aspirations- school
> plays, photoshoots,
> etc..
>
>
> Aspirations:
> id="aspirations">
>
>
>
> Media Type:
>
> *Media
> type includes specific types of jobs/ offers you are interested
> in.
>
>
>
>
> Upload Picture 1:
>
>
>
>
>
>
> Upload Picture 2:
>
>
>
>
>
> Upload Picture 3:
>
>
>
>
>
> Upload Picture 4:
>
>
>
>
>
> Upload Picture 5:
>
>
>
>
>
> Upload Picture 6:
>
>
>
>
>
> Upload Picture 7:
>
>
>
>
>
> Upload Picture 8:
>
>
>
>
>
>
>
>
>
>
> }
>
> ?>
>
>
>
>
>
>
>
> Sorry for the newbie question and the long-winded accompanying
> info here but I cannot pinpoint my error. I hope there is an
> easily spotted culprit above. Thanks again! -John
>
>
> ---
> Outgoing mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.467 / Virus Database: 266 - Release Date: 4/1/2003
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php