Note that there are some explanatory texts on larger screens.

plurals
  1. POPHP email, how to include variable in message
    primarykey
    data
    text
    <p>I have an upload script that I have purchased. I need to add some more functionality to it however and my php knowledge is pretty basic. What I need is for an email containing the file location to be sent out via email to a set address. Basically a notification that something has been uploaded.</p> <p>I have worked out what part of the code these needs to go in, and have got as far as adding this which works perfectly:</p> <pre><code>// Send Email Notification $to = "info@email.co.uk"; $subject = "A Website User uploaded files"; $message = "The download link goes here. "; $from = "registrations@email.co.uk"; $headers = "From:" . $from; mail($to,$subject,$message,$headers); </code></pre> <p>The next line of code in the script outputs the value I want to send in the message of the email like this:</p> <pre><code>$TMPL['message'] .= '&lt;div class="success"&gt;Download: &lt;a href="index.php?a=download&amp;q='.$execLastRow[0].'" target="_blank"&gt;'.$_FILES['fileselect']['name'][$key].'&lt;/a&gt;&lt;/div&gt;'; </code></pre> <p>Obviously this is the wrong syntax but this is the gist of what Im trying to do:</p> <pre><code>// Send Email Notification $to = "info@email.co.uk"; $subject = "A Website User uploaded files"; $message = "Download: &lt;a href="index.php?a=download&amp;q='.$execLastRow[0].'" target="_blank"&gt;'.$_FILES['fileselect']['name'][$key].'&lt;/a&gt;. "; $from = "registrations@email.co.uk"; $headers = "From:" . $from; mail($to,$subject,$message,$headers); </code></pre> <p>Assistance as always is appreciated!</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload