# Solved: Print and email button



## flyer0101 (Jan 19, 2010)

A few posts i have made recently is about a local page im making for my work where their is check boxes and they must check off tasks they have done there are also test entry fields for them to place there name is it possible to make a print button on the webpage which they click then it prints and would it also be possible to make it so i couls make a email button where it would send what check boxes were ticked to a certain email. I wont be able to run any server just a html page they can open sorry for bad grammar posting on a phone. Thanks flyer


----------



## ehymel (Aug 12, 2007)

flyer0101 said:


> is it possible to make a print button on the webpage which they click then it prints


Yes.



flyer0101 said:


> and would it also be possible to make it so i couls make a email button where it would send what check boxes were ticked to a certain email.


No, you'll need a server for this. There may be some free services out there, but it means trusting your information to go through a third party.


----------



## sepala (May 20, 2010)

As ehymel said, for that email thing, you need the support of a server. You can send JUST AN EMAIL using plain html mailto tag(Anyway this is also very bad thing, because it is opening the outlook or something like that), but you can't do the things what are you asking for at least without the help of PHP, so that means you need a server.


----------



## flyer0101 (Jan 19, 2010)

Ok thanks i was at work at the time of the post and they have blocked the whole internet besides about five sites so i had to use my phone and i only thought of posting here. Which is why i couldn't have the server at work or some where on the internet which sucks 

Thanks for you help i appreciate it.


----------



## ehymel (Aug 12, 2007)

sepala said:


> You can send JUST AN EMAIL using plain html mailto tag


Good point, but this depends on someone having an email client installed (e.g., Outlook as you suggested). On the other hand, if someone is not on their own machine, or if they don't use an email client, then this wouldn't be a good approach. I never use this method.



sepala said:


> but you can't do the things what are you asking for at least without the help of *PHP*


Just to be complete, this is not entirely true since php is only one of many options. Any server-side language could be used, including php, asp, perl, etc. For this sort of form-to-email processing, I have long (>10 years) used the perl script formmail (available here for free download). Looks like there is now a php version (here), not sure if they're related to the original or not.


----------



## thebeginner (Feb 13, 2008)

sepala said:


> As ehymel said, for that email thing, you need the support of a server. You can send JUST AN EMAIL using plain html mailto tag(Anyway this is also very bad thing, because it is opening the outlook or something like that), but you can't do the things what are you asking for at least without the help of PHP, so that means you need a server.


What you'd need is a web server. I use IIS, but there's also Apache. I wouldn't recogmend using HTML to send emails because HTML is very limited. First of all an HTML link only opens an email client. Also if HTML is used there's no support for a Subject. To do it in PHP just type the code below. I just got it off the top of my head so it may not be exactly correct. ASP.Net is a bit different.

mail("The Email", "[email protected]", $_POST['Form_Name']);

The ASP.Net would more like this. The first bit of code is with C# and the second is Visual Basic.Net. I don't know if I got this exactl correct. With ASP.Net one can also send file attachments. PHP as well and HTML.

Mail mail1 = new Mail();
mail1.Subject = "The Email";
mail.Send();

Dim mail1 As Mail = New Mail()
mail1.Subject = "The Email"
mail1.Send()

The ASP.Net code doesn't have the file attachment atribute set. I believe for printing you'd want the print command in PHP.


----------



## sepala (May 20, 2010)

ehymel; I have long (>10 years) used the perl script formmail (available [URL="http://www.scriptarchive.com/formmail.html" said:


> here[/URL] for free download). Looks like there is now a php version (here), not sure if they're related to the original or not.


wow..Thanks for the superb links ehymel!!


----------



## sepala (May 20, 2010)

for the ctrl+p thing, we can use programming languages and also seems like we can use JavaScript. I have done a small research so have a look at this google search

http://www.google.lk/#hl=en&source=...Search&aq=f&aqi=&aql=&oq=&fp=29c7fbccaa6db755


----------

