first off, here's my php page
and he input page contains these lines for the file browser thing:
<input type="file" name="userfile" size="20" tabindex="1">
and everytime I upload a file, i get this error:
Warning: Unable to open 'C:\\Documents and Settings\\Dimava\\Desktop\\dead.gif' for reading: No such file or directory in /home/virtual/site1/fst/var/www/html/new/admins/add_review.php on line 22
Successfully Added!
I've tried with other files too, same problem
any help with be appricated
thanks
Dimava
PHP Code:
<html>
<head>
<title>Add Reviews</title>
</head>
<?
require("config.php");
if ( $gamename == "") {
// input form
include("templates/review_input.php");
}
if ( $gamename != "" ) {
// processing unit
$link = mysql_pconnect( "localhost", $user, $pass );
mysql_select_db( $db, $link );
mkdir ( "../images/reviews/$gamename", 0777 );
chmod ("../images/reviews/$gamename", 0777);
if($userfile) {
copy($userfile, "../images/reviews/$gamename/$userfile_name"); echo "Successfully Added!<br>\n";
}
$query = "INSERT INTO reviews ( id, gamename, developer, headimage, description, category, rating_gameplay, rating_graphics,
rating_sound, rating_ingenuity, rating_replay, rating_overall ) values( '', '$gamename', '$developer', '$filename1', '$description', '$category',
'$gameplay_rating', '$graphics_rating', '$sound_rating', '$ingenuity_rating', '$replay_rating', '$overall_rating' )";
mysql_query($query);
mysql_close( $link );
}
?>
<input type="file" name="userfile" size="20" tabindex="1">
and everytime I upload a file, i get this error:
Warning: Unable to open 'C:\\Documents and Settings\\Dimava\\Desktop\\dead.gif' for reading: No such file or directory in /home/virtual/site1/fst/var/www/html/new/admins/add_review.php on line 22
Successfully Added!
I've tried with other files too, same problem
any help with be appricated
thanks
Dimava
Comment