|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Be the architects of evolution and help create the mobile internet future. It’s your move---enter to win here! |
|
#1
|
|||
|
|||
|
emailing an entire web page with submtted information.
Mac OS 9 AND OS X
I do not know php but I was given the following code to email an entire page with a form. Since it is a petition the entire text including the submitted information must be sent, The all inclusive page is not downloading. The code is as follows: <?php if (isset($HTTP_POST_VARS['nSubmit'])) { ?> <html><head><title></title></head<body><center><table border="1"> <tr><td>Your Name :</td><td><?php echo $HTTP_POST_VARS['nName']; ?</td></tr> <tr><td>Your Email:</td><td><?php echo $HTTP_POST_VARS ['nEmail']; ?></td></tr> <tr><td>Your Phone:</td><td><?php echo $HTTP_POST_VARS ['nPhone']; ?> </td></tr> <tr><td colspan="2"><inp! ut type="button" value="back" onclick="window.history.back();" /></td></tr> </table></center></body></html> <?php } else { $contents =<<< Qindex <html><head><title></title></head<body><center> <form name="nForm" method="post" action="http://www.LONGPORT.info/email.php"><table> <td width="479">Patrick Henry said TAXATION WITHOUT REPRESENTATION IS TYRNAY<BR> Please read and fill in your name at the bottom: <br>I believe that part time residents should be permitted to vote in local {i.e. Municipal & nbsp;and county} elections.<br> If you agree click SEND PETITION) <br> </td> <tr><td>Name :</td><td><input type="text" name="nName" /></td></tr> <tr><td>Email:</td><td><input type="text" name="nEmail" /></td></tr> <tr><td>Phone:</td><td><input type="text" name="nPhone" /></td></tr> <tr><td colspan="2"><input type="submit" name="nSubmit" value="Send Petition" </td></tr> </table></form> &nbs! p; </center></body></html> Qindex; $headers = "MIME-Version: 1.0n"; $headers .= "Content-type: text/html; charset=iso-8859-1n"; $headers .= "From: LONGPORT <LONGPORT@qindex.info>n"; if( mail("FRIENDS@LONGPO! RT.INFO","LONGPORT@HOTMAIL.com", "email containing an HTML page", $contents, $headers) ) echo "The email has been sent successfully."; } //if (isset($HTTP_POST_VARS['nSubmit'])) ?> If anyone could tell me what is wrong, it would greatly appreciatred. Yours truly, Jim |
|
#2
|
||||
|
||||
|
RE: emailing an entire web page with submtted information.
Hi there
some of the syntax I don't understand and there's been some corruption in the post. And this should be in the php forum. Anyway... You need to debug this to see what you get. *Is the content for the screen displayed? *Can you echo out "<hr>$contents<hr>" and see the contents of the email on the screen. * Can you email at all? You need to isolate what works, what doesn't, line numbers etc. I know this isn't a simple or quick answer but you need to understand your code and how to make it work more than you need a quick answer. |
![]() |
| Viewing: Codewalkers Forums > Other Technologies > Client Side Things > emailing an entire web page with submtted information. |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|
|
|