-
HTML emial Passing values
Hi,
I wrote a code that send an email with HTML tags like buttons and tables and text areas;
The whole Idea is that this email will be sent to the supervisor with registration information of the users,
I have the textarea included with the email, and I want the supervisor to write his notes in this textarea and click accept button or Decline button and this will send an email back (reply) to the person who is trying to register with what ever inside the textarea but I could not pass the value of the textarea at all.
any ideas please......
-
Never mind its working now
Thank you
-
Can you elaborate
I would like to receive info from an e-mail directly into a table. Could you share how you accomplished this?
-
I will try to help you
but I am doing somthing else in a new job
so I'm really busy.
What you can do is to send the values
in the query string from the email
and you should be able to read them back
I will send you my code when I find it.
-
That would be great!
THANKS!! That would be great to get my hands on some code... and actually have a place to start!
-
I am so sorry for the Delay man I'm sure that you found a solution for this but I gave you my word, I had to leave the country -My father passed away- I am sorry again
here is my code if you have any question I'll try to help.
Good luck
$url = "http://www.eee.eeee\n";
$accept = "<INPUT TYPE=SUBMIT NAME=Decline VALUE=Approve style='border: 1px solid'>\n";
$decline = "<INPUT TYPE=SUBMIT NAME=Decline VALUE=Decline style='border: 1px solid'>\n";
$Reason_Area = "<TEXTAREA NAME=Reason rows=5 cols=50></TEXTAREA>\n";
$from_name = "$FName $LName";
$from_email = "$Email";
$to_name = "Program Administrator";
$to_email = "to@hisemail.com";
$subject = "Registration Information";
// headers need to be in the correct order...
$headers = emial_header($from_name, $from_email); // Function
// plaintext section begins
$message = emial_message(); // Function
$message .= "<HTML>\n";
$message .= "<TABLE align=center Border=5>\n";
$message .= "<TR><TD colspan=4 align=center bgcolor=aabbaa><B>Check Your Information</B></TD></TR>\n";
$message .= "<TR><TD bgcolor=aabbaa><B>Name: </B></TD><TD colspan=3 bgcolor=AntiqueWhite>$FName $LName </TD></TR>\n";
$message .= "<TR><TD bgcolor=aabbaa><B>SSN: </B></TD><TD colspan=3 bgcolor=AntiqueWhite>$SSN </TD></TR>\n";
$message .= "<TR><TD bgcolor=aabbaa><B>Email: </B></TD><TD colspan=3 bgcolor=AntiqueWhite>$Email </TD></TR>\n";
$message .= "<TR><TD bgcolor=aabbaa><B>Password: </B></TD><TD colspan=3 bgcolor=AntiqueWhite>$Password </TD></TR>\n";
$message .= "<TR><TD bgcolor=aabbaa colspan=4 align=center><B>I am trying to register to these classes </B> </TD></TR>\n";
$message .= "<TR bgcolor=aabbaa><TD align=center><B>Course Name</B></TD><TD align=center><B>Instructor</B></TD><TD align=center><B>Term</B></TD><TD align=center><B>Description</B></TD></TR>\n";
for ($i = 0;$i < $count;$i++)
{
Connector("Database", ""); // Function to conn. to DB
$Read_Access = "SELECT * FROM filename WHERE ID = '$Arr_ID[$i]'";
$Result = mysql_query($Read_Access);
while($row = mysql_fetch_row($Result))
{
$message .= "<TR bgcolor=AntiqueWhite><TD>$row[1]</TD><TD>$row[2]</TD><TD>$row[3]</TD><TD>$row[4]</TD></TR>\n";
}
}
$message .= "<FORM ACTION='http://fullpathtothefilename/Answer.php?Decline=Approve&Email=$Email&FName=$FNa me&LName=$LName&SSN=$SSN&Password=$Password' METHOD=GET>\n";
$message .= "<TR><TD colspan=4 align=center bgcolor=aabbaa><INPUT TYPE=SUBMIT NAME=Decline VALUE=Approve style='border: 1px solid'></TD></TR>\n";
$message .= "<INPUT TYPE=HIDDEN NAME=Email VALUE=$Email>\n";
$message .= "<INPUT TYPE=HIDDEN NAME=FName VALUE=$FName>\n";
$message .= "<INPUT TYPE=HIDDEN NAME=LName VALUE=$LName>\n";
$message .= "<INPUT TYPE=HIDDEN NAME=SSN VALUE=$SSN>\n";
$message .= "<INPUT TYPE=HIDDEN NAME=Password VALUE=$Password>\n";
$message .= "</FORM>\n";
$message .= "<FORM ACTION='http://fullpathtothefilename/Answer.php?Decline=Decline&Email=$Email&FName=$FNa me&LName=$LName&SSN=$SSN&Password=$Password&Reason =$Reason' METHOD=GET>\n";
$message .= "<TR><TD colspan=4 align=center bgcolor=aabbaa><TEXTAREA NAME=Reason rows=5 cols=50></TEXTAREA></TD></TR>\n";
$message .= "<TR><TD colspan=4 align=center bgcolor=aabbaa><INPUT TYPE=SUBMIT NAME=Decline VALUE=Decline style='border: 1px solid'></TD></TR>\n";
$message .= "<INPUT TYPE=HIDDEN NAME=Email VALUE=$Email>\n";
$message .= "<INPUT TYPE=HIDDEN NAME=FName VALUE=$FName>\n";
$message .= "<INPUT TYPE=HIDDEN NAME=LName VALUE=$LName>\n";
$message .= "<INPUT TYPE=HIDDEN NAME=SSN VALUE=$SSN>\n";
$message .= "<INPUT TYPE=HIDDEN NAME=Password VALUE=$Password>\n";
$message .= "</FORM>\n";
$message .= "</TABLE></HTML>\n";
mail("$to_name<$to_email>", $subject, $message, $headers);
// Functions
function emial_header($from_name, $from_email)
{
$separator = "MiraxTesting";
$header = "From: $from_name<$from_email>\n";
$header .= "MIME-Version: 1.0\r\n";
$header .= "Reply-To: <$from_email>\n";
$header .= "Content-Type: multipart/alternative; charset=\"iso-8859-1\"; boundary=\"$separator\";\r\n\r\n";
$header .= "Content-Transfer-Encoding: 8bit\r\n";
$header .= "X-Priority: 3\r\n";
$header .= "X-Mailer: phpmailer [version 1.40]\r\n";
$header .= "Return-Path: $from_email\r\n";
return $header;
}
function emial_message()
{
$separator = "MiraxTesting";
$message = "--$separator\r\n";
$message .= "Content-Type: text/html; charset=\"iso-8859-1\"\r\n";
$message .= "Content-Transfer-Encoding: 8bit\r\n\r\n";
$message .= $part2."\r\n\r\n";
$message .= "\n";
// your html goes here -- It didn't appear properly without
// the weird markup that outlook added after sending
$message .= "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\">\r\n";
return $message;
}
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|