in some admin forms i have made for a music reviews system, i have provided an image upload script, i want to give the image a defult name of the band and album with no spaces / special characters which i have adequetly done below. the problem comes when i try to ad the .jpg onto the end of the string, the " . " is being read as something else i think.. and i'm not quite sure how to get around it. does anyone have any ideas how to tag the period on and adequately add .jpg to the end of the name ?
$new_img = $band;
$new_img .= $album;
$new_img .= ".jpg";
$new_img = preg_replace('/[^a-zA-Z0-9]/', '', $new_img);
copy("$new_rev_img", "/home/path/to/images/music/$new_img")
or die("couldn't copy image");
thanks so much !!