cureheaded Posted March 6, 2010 Share Posted March 6, 2010 Hi Guys, I am at a loss, so I would like to ask for your help (first timer on a forum) Situation: I have a HTML(PHP) form with a lot of textfields. On submitting this a php script runs which creates a complex mail (HTML, attachements, ...) and sends it. The method I use for (a part of) the body of the message is to create a string in php with the html tags (and using correct headers) So the mail arrives and looks just the way I want it. But here it goes wrong this is a part of the html code I send: $bl .= '<form id="admsend" name="admsend" method="post" action="mailto:me@myplace.xx">'; $bl .= '<input type="submit" name="sendadm" id="sendadm" value=" forward this form " /></br>'; $bl .= '</form>'; so, it is your basic html mailto and it does show up as a clickable button, but is does not open a mailprog as it does when inside a brower. Any ideas? ANY SUGGESTION is very welcome!!! THANKS !! C. Quote Link to comment Share on other sites More sharing options...
trq Posted March 6, 2010 Share Posted March 6, 2010 The action attribute needs to be a url. Quote Link to comment Share on other sites More sharing options...
Dennis1986 Posted March 6, 2010 Share Posted March 6, 2010 Use mail(): http://php.net/manual/en/function.mail.php Quote Link to comment Share on other sites More sharing options...
cags Posted March 6, 2010 Share Posted March 6, 2010 To clarify what thorpe and Dennis1986 are saying, it's not possible to to simply use a mailto link as the action on a form and make it send an e-mail, pre-fill in an e-mail etc. If you are using a form in that manner you will need to submit to a script on your page and use the mail function to send the actual e-mail, thus bypassing the users e-mail client. Alternatively you have a standard anchor link on your page with that title, which will open their e-mail client, this does not use a form at all. For more detailed help we need more information to put the code you posted into context. Alternatively you can pick a ready made script for a few $'s if you wanted to for example Simple Feedback Form, or there are plenty of free tutorial about this around. Quote Link to comment Share on other sites More sharing options...
cureheaded Posted March 8, 2010 Author Share Posted March 8, 2010 Hello everybody, first of all. thanks a lot for your reactions. I read them carefully. Now I am thinking I did not make myself very clear or maybe I don't understand all you helpful people are sayinf. So I am working from a webpage ande that sends me an email. Inside that email there is a form(created by passing Html as a string through PHP) . Inside my mailbox it looks a little like this: (see image)[/img] and THEN I just want to press the button INSIDE by mailbox (not on the internet) - which should result in sending a mail (or opening a new mail window with (only) this form as message. thank you for helping me out! C. [attachment deleted by admin] Quote Link to comment Share on other sites More sharing options...
burunduk Posted March 12, 2010 Share Posted March 12, 2010 I'll show you a special tutorial resource on the various web forms, including and email forms too. This resource (php form tutorials) probably have the answer to your question. Good luck. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.