PC Playground  

Go Back   PC Playground > The Core > Scripting/Programming
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 01-20-2003, 04:41 PM
Administrator
 
Join Date: Jan 2003
Posts: 1,350
Default Form Mailer

I am having trouble with a form. Part of the code is:

<form method="POST" name="Test_Form" action="mailto:webmaster@pcplayground.com">

When I put this file on the server, the server does not email me the form results. My email program pops up a message asking me if its ok for me to mail it from my default email account. How will I set this form up to use the server to email it, and email it to me?
Reply With Quote
  #2 (permalink)  
Old 01-20-2003, 05:16 PM
Member
 
Join Date: Jan 2003
Location: Netherlands
Posts: 75
Send a message via MSN to utimer
Default

The most simple thing is to make an php page which mails:
the form would be
Code:
<form method="POST" name="Test_Form" action="mail.php">
the content of the mail.php file would be:
Code:
<?PHP // first we give in the internal names for php // this are just examples. If you got more fiels, add more lines. // syntax of a line: // $internalname = $HTTP_POST_VARS["name of field in html form"]; $mailadres = $HTTP_POST_VARS["mailadres"]; $question= $HTTP_POST_VARS["question"]; mail($mailadres,"title of mail","your message. include form fields by typing the internal name (for example $question)". ?>
NOTE: This is a very simple sample. If you need more or if you have questions you can just mail them.
Reply With Quote
  #3 (permalink)  
Old 01-20-2003, 05:19 PM
Administrator
 
Join Date: Jan 2003
Posts: 1,350
Default

What I gave you is HTML... so I dont think I can use that PHP code. :)

Ahh... my hero is alive... Ill email you with more info.

*bows to utimer*
Reply With Quote
  #4 (permalink)  
Old 01-21-2003, 09:31 PM
Member
 
Join Date: Jan 2003
Location: Netherlands
Posts: 75
Send a message via MSN to utimer
Default module

Well I mailed you the complete module you will need.
Reply With Quote
  #5 (permalink)  
Old 01-25-2003, 08:20 AM
Junior Member
 
Join Date: Jan 2003
Location: Canada
Posts: 9
Default Just posting the answer in case someone else has the problem

Simple

Use
METHOD=POST

without the "quotation marks" around post

tis all

good html resourse is

Bare Bones Guide to HTML

http://werbach.com/barebones/barebones.txt

and download from here

http://werbach.com/barebones/download.html
Reply With Quote
Reply


Thread Tools
Display Modes

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
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 10:20 PM.