Check these as well:
In the html form tag - make sure it has the enctype set eg
Code:
form action="your_php_file.php" enctype="multipart/form-data" method="post" name="my_form" >
also in the php file you should have something like
Code:
if ($_FILES['attachment1']['name']<>"") {
$mail->AddAttachment($attachment1,$_FILES['attachment1']['name']); // add attachment from form field called attachment1
}
Hope this helps