SunQuest
           Client Side Things
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Codewalkers ForumsOther TechnologiesClient Side Things

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Codewalkers Forums Sponsor:
Be the architects of evolution and help create the mobile internet future. It’s your move---enter to win here!
  #1  
Old April 24th, 2003, 12:03 PM
JIMBO86 JIMBO86 is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Posts: 5 JIMBO86 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
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


Reply With Quote
  #2  
Old April 24th, 2003, 09:07 PM
sarah's Avatar
sarah sarah is offline
Contributing User
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: Auckland, New Zealand
Posts: 127 sarah User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 5 m 32 sec
Reputation Power: 2
Send a message via ICQ to sarah Send a message via AIM to sarah Send a message via Google Talk to sarah
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.

Reply With Quote
Reply

Viewing: Codewalkers ForumsOther TechnologiesClient Side Things > emailing an entire web page with submtted information.


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway