Jump to content
Magnifico

Contact Us Forma

Recommended Posts

Sveiki,  

Radās problēma ar kontakta formu, strādā viss izņemot attachment, aizsūtot uz email, attachments netiek pievienots, tā vietā parādās $mainīgais uz kura tam vajadzētu būt. 

Varbūt kāds var iedot piemēru kā pievienot tikai attachment vai arī pastāstīt kā izlabot šo ? 

Bildes pielikumā. 

Email2.png

Email.png

Share this post


Link to post
Share on other sites
if (isset($_FILES['uploaded_file']) &&
    $_FILES['uploaded_file']['error'] == UPLOAD_ERR_OK) {
    $mail->AddAttachment($_FILES['uploaded_file']['tmp_name'],
                         $_FILES['uploaded_file']['name']);
}

Kad suti šādi, bez foreach, tad nestrada? un ieteiktu izmantot labāk

 

 for($i = 0; $i < count($_FILES['attachments']); $i++) { echo $_FILES['attachments'][$i]['tmp_name'] }  

 

Edited by Kyrgios

Share this post


Link to post
Share on other sites

Sāc ar to, ka ieliec visu kodu, arī to daļu, kas reāli sūta e-pastu.

@Kyrgios Un ar ko tieši tavs loopošanas variants ir labāks?

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.