0

I'm looking to those with far more experienced than me for a solution to a problem.

The following works partly.

echo "<td width='28%'>" .
    $qry['name'] .
    "<br>" .
    $qry['address1'] .
    "<br>" .
    $qry['address2'] .
    "<br>" .
    $qry['town'] .
    "<br>" .
    $qry['postcode'] .
    "<br>TeleNo : " .
    $qry['telephone'] .
    "<br>" .
    $qry['email'] .
    "<a href='mailto:" .
    $qry['email'] .
    "'?Subject=Thank%20You>  - Send eMail</a></td>";

It creates the table field OK and, when "Send eMail" is clicked, the email client pops up opening an email with the address in the To field OK but the Subject field is blank.

I've tried all combinations of single and double quotation marks but some fail while no working combination will fill the subject field in the email.

I could live with that but I'd really prefer it worked.

Any suggestions gratefully received.

amphetamachine
  • 27,620
  • 12
  • 60
  • 72
GeorgeRO
  • 3
  • 3
  • Just hit "Ctrl+U" (or your browser's short-cut for "View Source") and look at the **generated** HTML. – Álvaro González Dec 09 '15 at 17:38
  • Do you need help? Soplease post your code here and not just a small snippet. Nobody here wants to guess. – Franco Dec 09 '15 at 17:38
  • There's no need to guess - all the information you needed to solve the problem was in the snippet. Thanks to Muhammet for using his eyes! – GeorgeRO Dec 09 '15 at 17:47

1 Answers1

4

Look at the closing quote, it should be after subject:

<a href='mailto:" . $qry['email'] . "?Subject=Thank%20You'>

NOT

<a href='mailto:" . $qry['email'] . "'?Subject=Thank%20You>
Muhammet
  • 3,288
  • 13
  • 23