Using a button to send mail?

the mail() function

Moderators: macek, egami, gesf

Ken Masters
New php-forum User
New php-forum User
Posts: 4
Joined: Sat Mar 15, 2003 1:43 pm
Location: Vancouver, B.C.

Using a button to send mail?

Postby Ken Masters » Wed Mar 26, 2003 1:08 pm

How do you use a button to send an email?

This does not work:

Code: Select all

<a href="<?php mail(); ?>"><img src="button.gif"></a>


So what do you do?[/code]

User avatar
Oleg Butuzov
Last Samuray
Last Samuray
Posts: 831
Joined: Sun Jun 02, 2002 3:09 am

Postby Oleg Butuzov » Fri Mar 28, 2003 5:56 am

<a href=mailto:my@mail.com>my@mail.com</a>

bonkers
New php-forum User
New php-forum User
Posts: 46
Joined: Wed Mar 12, 2003 7:17 pm

Postby bonkers » Thu Jun 26, 2003 7:02 am

Simlply mail with a form and link to the form:

<a href="mail.php&option1=whatever&option2=whateveragain">Mail</a>

mail.php

Code: Select all

<?
mail($_GET[option1],$_GET[option2]);
?>


Return to “PHP coding => Mail”

Who is online

Users browsing this forum: No registered users and 1 guest