hi,
pls help me the following if feasible.
1. i have a file "tax.php"
<TR>
<td ALIGN = "left" valign = "top"> <b>ABC</b> <br> --ABC BG<br> <u>Address- </u>123 main st. Suite 307, Flushing, NY 11354<br>
<u>Phone </u>111-11-11<br><u>Email</u>- SOMEONE@DOMAIN.COM</td>
<td ALIGN = "left" valign = "top"> <b>ABC</b> <br> --SDFS BG<br> <u>Address- </u>123 main st. Suite 307, Flushing, NY 11354<br>
<u>Phone </u>111-11-11<br><u>Email</u>- SOMEONE2@DOMAIN.COM</td>
<td ALIGN = "left" valign = "top"> <b>ABC</b> <br> --AFDF DFSDF BG<br> <u>Address- </u>123 main st. Suite 307, Flushing, NY 11354<br>
<u>Phone </u>111-11-11<br><u>Email</u>- SOMEONE3@DOMAIN.COM</td>
</TR>
2. TAXFORM.PHP
<form name="myForm"
action="/Tax1mail.php" method="post">
<input type="hidden" name="subject" value="Form Submission" />
<input type="hidden" name="redirect" value="thankyou.html" />
Name: <input type="text" name="fname" />
Email: <input type="text" name="email" />
Phone No: <input type="text" name="phone" />
<input type="submit" name="submit" value="submit"/>
</form>
3. TAX1MAIL.PHP
ITS MAIL FUNCTION
<?php
$to = "SOMEONE1@SOMEONE.COM";
// it is best to have the email sent to a email that is part of the domain.
$subject = "Brought to you by Bengali";
$Sender = "SOMEONE@DOMAIN.com"; // set this to an email address on the domain where the email is coming from.
$EmailAd = "Email Address";
$Namee = "Name";
$Phon = "Phone";
$name = $_POST["fname"];
$email = $_POST["email"];
$phone = $_POST["phone"];
$message = "\r\nName = $name\r\nEmail = $email\r\nPhone = $phone"; // Always set content-type when sending HTML email
$headers = "MIME-Version: 1.0" . "\r\n";
$headers .= "Content-type:text/html;charset=iso-8859-1" . "\r\n";
// $headers .= "Reply-To: ".$email."\r\n";
$headers = "From: ".$Sender . "\r\n" .
'Reply-To: '.$email. "\r\n".
'X-Mailer: PHP/' . phpversion();
if (mail($to,$subject,$message, $header))
{echo("<p>Message successfully sent!</p>");
echo ( '<A href = "index.php">Home Page</A>' );}
else {echo("<p>Message delivery failed...</p>");}
?>
----------
user click a link which will open file1. file1 may have a list of 100 ppl with 100 diferent email addresses.
user wants to send an email to a person. now i hard coded each and every PERSON'S email in file1. but tht is not connected to file2 and 3.
requirement:
i want a user be able to click a link which will open file 2.
in file 2, he will submit the form
file 3 will send the email.
bad programming solution 1:
1. i can CUT person's email address from file1.
2. paste into file 3 . $TO = email address
3. also, IN file2, type action = /TAX1MAIL.PHP
that means if i have 100 email addresses in file1. i need 100 *2 = 200 files to do that. i beleive this is a bad program.
question? how can i solve this in better programming? i am trying to have one tax1mail.php and one taxform.php instead of 200. i am totally lost.
sorry if i confused you.
PLS ADVISE.
thx.