/    Sign up×
Community /Pin to ProfileBookmark

email form that handles multiple addresses

Hello,
I’d like to create an email form that has the ability to handle numerous email addresses of contacts on a page. Is there a way that when you click a users email link it directs to the form and populates the send address with an email address specific to that person? Does this require a database? I thought that you could send the address as a variable that the from then uses. How could I go about this?
regards,
Steve W.

to post a comment
PHP

2 Comments(s)

Copy linkTweet thisAlerts:
@NightShift58Mar 24.2007 — Just like any other $_GET.[code=php]<a href='[email protected]'>Bokeh</a>[/code]In nextpage.pgp, capture with: [b]$_GET['email'][/b].
Copy linkTweet thisAlerts:
@pcthugMar 24.2007 — Very susceptible to mail server hijacking, I'd suggest in the very least that you check that the email address against a whitelist, or better yet (prevent spam bots collecting the email address from URL's) just assign any given email a numeric indice: [code=php]
$addresses = array(
'[email protected]', // this will be the default address
'[email protected]',
'[email protected]');

$email = array_key_exists((int)$_GET['email'], $addresses) ? $addresses[(int)$_GET['email']] : $addresses[0];[/code]

[code=html]
<a href='nexptage.php?email=0'>E-mail Foo</a>
<a href='nexptage.php?email=1'>E-mail Bar</a>
<a href='nexptage.php?email=2'>E-mail Baz</a>
[/code]
×

Success!

Help @tiki16 spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.6,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...