Hi all, I am having a problem with uploading an image to the server, all seems to work ecept the image does not upload?
And the "images" directory is CHMOD 777
Any help would be appreciated...
$cnxion = mysql_connect( "localhost", $user, $pass );
if ( ! $cnxion ) die( "Couldn't connect to MySQL" );
mysql_select_db( $db, $cnxion ) or die ( "Couldn't open database: ".mysql_error() );
$query = "INSERT INTO Events_eve SET promoName_eve = '$PromoName_eve', promoTor_eve = '$PromoTor_eve', promoDate_eve = '$PromoDate_eve', promoTime_eve = '$PromoTime_eve', promoBlurb_eve = '$PromoBlurb_eve', promoDresscode_eve = '$PromoDresscode_eve', promoPrice_eve = '$PromoPrice_eve', promoFlyer_eve = '$PromoFlyer_eve_name'";
mysql_query( $query, $cnxion ) or die ( "Couldn't add data to the Database table: ".mysql_error() );mysql_close( $cnxion );
## Upload Image
exec("cp $PromoFlyer_eve /images/$PromoFlyer_eve_name");
echo "temp file: $PromoFlyer_eve<br>\n";
echo "file name: $PromoFlyer_eve_name<br>\n";
echo "file size: $PromoFlyer_eve_size<br>\n";
echo "file type: $PromoFlyer_eve_type<br>\n";
echo "<br>\n";
echo "<img src=images/$PromoFlyer_eve_name><br>\n";