delphi programming forums mysql charset mget recursive synonimos
free ventrilo servers hosting cs javascript delay python find in list
Back Forum New
abstract:

                                                                                                                                                                        <div><textarea name="textarea" class="textarea"  cols="35" rows="55">&nbsp;Message:</textarea></div><br />
                                                                                                                                                          <a href="#" style="margin:0 13px 0 151px" class="more" onclick="document.getElementById('form').reset()">clear</a><a href="#" class="more" onclick="document.getElementById('form').submit()">send</a>                                                                                                                                                                </td>
                                                                                                                                                        </tr>
                                                                                                          </table>
                                                                                            </form>
Hope someone can help ASAP. Thanks.


Hello. I have a contact form generated in a .HTML file based from a template. I do not know what to input into the FORM ACTION="#" tag, the A HREF="#" link for the "clear" button and the A HREF="#" link for the "submit" button. Do I also need to include a METHOD="POST" tag? I want to submit the info from the form to an e-mail address but without showing the e-mail address to site visitors. Here's the code:
<form action="#" id="form">
                                                                                                          <table class="box2" align="center">
                                                                                                                                                        <tr>
                                                                                                                                                                <td style="width:203px">
                                                                                                                                                                        <div class="h_f"><input type="text" class="input1 h" value="&nbsp;Name:" /></div>
                                                                                                                                                                        <div class="h_f"><input type="text" class="input1 h" value="&nbsp;E-mail:" /></div>
                                                                                                                                                                        <div class="h_f"><input type="text" class="input1 h" value="&nbsp;Tel:" /></div>
                                                                                                                                                                        <div class="h_f"><input type="text" class="input1 h" value="&nbsp;Fax:" /></div>                                                                                                                                                                </td>
                                                                                                                                                          <td style="width:246px">
                                                                                                                                                                        <div><textarea name="textarea" class="textarea"  cols="35" rows="55">&nbsp;Message:</textarea></div><br />
                                                                                                                                                          <a href="#" style="margin:0 13px 0 151px" class="more" onclick="document.getElementById('form').reset()">clear</a><a href="#" class="more" onclick="document.getElementById('form').submit()">send</a>                                                                                                                                                                </td>
                                                                                                                                                        </tr>
                                                                                                          </table>
                                                                                            </form>
Hope someone can help ASAP. Thanks.

TOP

<form method="post" action="emailpage.php" name="form1">
</form>
And as the previous poster mentioned use submit button

TOP


Originally Posted by Kravvitz
You need a server-side language, like PHP, to send you the email. What server-side languages are available on your server?
It's best to use <input type="submit" value="Send"> or <button type="submit">Send</button> elements instead of an <a> element to submit the form.
Also it's best to avoid including clear or reset buttons.
I think the server I'm using supports PHP. I downloaded a Formmail PHP script but do I then have to create a .PHP page first? I'll take out the "clear" button too.

TOP


Originally Posted by manny786
<form method="post" action="emailpage.php" name="form1">
</form>
And as the previous poster mentioned use submit button
Not sure what you mean by "emailpage.php." Do I create a .PHP file that's like a contact page?

TOP

abstract:

                                                                                                                                                                        <div><textarea name="textarea" class="textarea"  cols="35" rows="55">&nbsp;Message:</textarea></div><br />
                                                                                                                                                          <a href="#" style="margin:0 13px 0 151px" class="more" onclick="document.getElementById('form').reset()">clear</a><a href="#" class="more" onclick="document.getElementById('form').submit()">send</a>                                                                                                                                                                </td>
                                                                                                                                                        </tr>
                                                                                                          </table>
                                                                                            </form>
Hope someone can help ASAP. Thanks.


I am learning to write my own PHP code, but in the meantime I've found the free code offered at this site to be useful:
http://www.thesitewizard.com/wizards/feedbackform.shtml
In a few simple steps the site wizard sets up the php code for you. You place this code in a new file called feedback.php and place this file in the same folder as the page of your contact form. In the code of your form, you simply add this at the start:
Code:
  1. <form action="feedback.php" method="post">
Copy Code
You also create two other .html pages, a thankyou page and an error page (for successful and unsuccessful form completion respectively).
Pretty basic, but works really well if you can't write your own PHP, or if you don't want to buy software to write the code for you.

TOP

The e-mailpage.php converts the inputted to vars
In your html:
Code:
  1. <form action="process.php" name="form1">
  2. <table class="box2" align="center">
  3. <tr>
  4. <td style="width:203px">
  5. <div class="h_f"><input type="text" class="name" value="&nbsp;Name:" /></div>
  6. <div class="h_f"><input type="text" class="email" value="&nbsp;E-mail:" /></div>
  7. <div class="h_f"><input type="text" class="tel" value="&nbsp;Tel:" /></div>
  8. <div class="h_f"><input type="text" class="fax" value="&nbsp;Fax:" /></div> </td>
  9. <td style="width:246px">
  10. <div><textarea name="textarea" class="textarea" cols="35" rows="55">&nbsp;Message:</textarea></div><br />
  11. <a href="#" style="margin:0 13px 0 151px" class="more" onclick="document.getElementById('form').reset()">clear</a><a href="#" class="more" onclick="document.getElementById('form').submit()">send</a> </td>
  12. </tr>
  13. </table>
  14. </form>
Copy Code
process.php
PHP Code:
<?php
if (
array_key_exists
(
'Contact'
,
$_POST
))
{
$to
=
'set this to the required email'
;
$subject
=
'Contact'
;
$name
=
$_POST
&#91;
'name'
];
$email
=
$_POST
&#91;
'email'
];
$tel
=
$_POST
&#91;
'tel'
];
$fax
=
$_POST
&#91;
'fax'
];
$textarea
=
$_POST
&#91;
'textarea'
];
$headers
=
"from:$email"
;
$mess
=
'name: '
.
$name
.
"\n."
;
$mess
.=
'email: '
.
$email
.
"\n"
;
$mess
.=
'tel: '
.
$tel
.
"\n"
;
$mess
.=
'fax: '
.
$fax
.
"\n"
;
$mess
.=
'Message: '
.
$textarea
.
"\n"
;
mail
(
$to
,
$subject
,
$mess
,
$headers
);
}
?>
I hope this works, was kind of quick



                                                                                                                                                                        <div><textarea name="textarea" class="textarea"  cols="35" rows="55">&nbsp;Message:</textarea></div><br />
                                                                                                                                                          <a href="#" style="margin:0 13px 0 151px" class="more" onclick="document.getElementById('form').reset()">clear</a><a href="#" class="more" onclick="document.getElementById('form').submit()">send</a>                                                                                                                                                                </td>
                                                                                                                                                        </tr>
                                                                                                          </table>
                                                                                            </form>
Hope someone can help ASAP. Thanks.

TOP

Back Forum