Jump to content

Multiple / Individual Recipients Using One Form


Elemental
 Share

Recommended Posts

Hey Folks, I couldn’t find anything on what I was searching for, could be the syntax I used, so if the followinghas been submitted before please direct me to it and delete this post if possible.I have seen the following two form examples being used, there may be others I haven’t seen yet but…The first example looks something like this:

<form name="form1" method="post" action="http://www.companiesURL.com/cgi-sys/FormMail.cgi"><input type="hidden" name="recipient" value="email_1@companiesURL.com"><input type="hidden" name="recipient" value="email_2@companiesURL.com">

The second example looks something like this:

<form name="form1" method="post" action="webformmailer.php"><input type="hidden" name="ContactFrom" value="Contact_Form" />

The first difference I noticed was the form’s action value and then the input field value.Questions…:Without taking to much of anyone’s time why one versus the other?Is it cgi vrs. php?Is it a server/hosting issue (Win. vrs. Linux)?Is it a personal preference?Assuming the email addresses are correct in the first example am I correct in saying that both email addresseswould receive the same email when form is submitted?And lastly, the reason this all started, is it possible to have one form and have that one form be used to contactanyone person or department in the company, individual or group?Peace,Elemental

Link to comment
Share on other sites

  • 1 month later...
Hey Folks, I couldn’t find anything on what I was searching for, could be the syntax I used, so if the followinghas been submitted before please direct me to it and delete this post if possible.I have seen the following two form examples being used, there may be others I haven’t seen yet but…The first example looks something like this:
<form name="form1" method="post" action="http://www.companiesURL.com/cgi-sys/FormMail.cgi"><input type="hidden" name="recipient" value="email_1@companiesURL.com"><input type="hidden" name="recipient" value="email_2@companiesURL.com">

The second example looks something like this:

<form name="form1" method="post" action="webformmailer.php"><input type="hidden" name="ContactFrom" value="Contact_Form" />

The first difference I noticed was the form’s action value and then the input field value.Questions…:Without taking to much of anyone’s time why one versus the other?Is it cgi vrs. php?Is it a server/hosting issue (Win. vrs. Linux)?Is it a personal preference?Assuming the email addresses are correct in the first example am I correct in saying that both email addresseswould receive the same email when form is submitted?And lastly, the reason this all started, is it possible to have one form and have that one form be used to contactanyone person or department in the company, individual or group?Peace,Elemental

Been browsing through the forums and saw this was unanswered...Im guessing the two examples you mentioned above do the same thing? correct me if im wrong.Assuming what I just said was true, yes it is just cgi vs php.Not much of a server/hosting issue.Possibly a personal preference, but more likely the php would be used due to everything that can be done.To make it easier, a combined form of both would make things a lot easier.
<form name="form1" method="post" action="webformmailer.php"><input type="hidden" name="recipient" value="email_1@companiesURL.com">

Considering the fact that in both forms the inputs are all hidden, I am assuming a script such as javascript is calling this form somehow.Or even a static function when a link is clicked a cetain message is sent to a certain email to inform them of something.If you are trying to make a mass email or memo site, then you would have visible form objects. Like so:

<form method="post" action="webformmailer.php">		From: <input type="text" name="from" /> <br />		Mail To: <input type="text" name="mailto" /> <br />		Subject: <input type="text" name="subject" /> <br />		Message: <input type="text" name="message" /> <br />		<input type="submit" value="Send"></form>

Then im the webformmailer.php you would bring in the variables:

$mfrom = $_POST['from'];$mto = $_POST['mailto'];$msubject = $_POST['subject'];$msg = $_POST['message'];//Code to split multiple email addresses//Code to send messages/memos

Hope this helps.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...