Go Back   CP Web Hosting - reseller hosting > Browser Scripting, HTML, XML and Multimedia > HTML/XHTML
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 06-21-2007, 10:31 AM
Senior Member
 
Join Date: Apr 2007
Posts: 311
Default contact form help

I want to make contact form . How hard is it ?
Anyone have any experience?
Reply With Quote
  #2 (permalink)  
Old 06-21-2007, 10:36 AM
Senior Member
 
Join Date: May 2007
Posts: 244
Default

Quote:
Originally Posted by Axe Solutions View Post
I want to make contact form . How hard is it ?
Anyone have any experience?

to make this i m giving you the codes of
1. the forum you insert into a HTML page
2. the PHP file that processes the form and sends it to your email address

insert into a HTML page

Code:
<form name=contactme action=contactme.php method=post>
<div align="center">
<table>
<tr>
<td align=right>Your Name:</td>
<td width="15">&nbsp;</td>
<td><input size=45 maxlength=45 type=text name=name
style="font-family: Courier New; font-size: 10pt"></td></tr>
<tr>
<td align=right>Your Email Address:</td>
<td>&nbsp;</td>
<td><input size=45 maxlength=45 type=text name=from
style="font-family: Courier New; font-size: 10pt"></td></tr>
<tr>
<td align=right>eMail Subject:</td>
<td>&nbsp;</td>
<td><input size=45 maxlength=90 type=text name=subject
style="font-family: Courier New; font-size: 10pt"></td></tr>
<tr>
<td valign=top align=right>Contents:</td>
<td>&nbsp;</td>
<td><textarea name=body rows=12 cols=60
style="font-family: Courier New; font-size: 10pt"></textarea></td></tr>
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td><input type=submit value=" Submit " name=submit style="font-size: 10pt; font-family: Tahoma"></td></tr>
</table>
</div>
</form>
PHP code:-

save in same folder the below code to a file called in our example contactme.php
the name MUST be identical as in the form itself !!!!
if you save into OTHER folder - then adapt the path of "action=contactme.php" above

Code:
<?php
$body="
$name ($from) sent you an online message:

Comments:
========
$body";

$success = mail("YOUR recipient email @ your_site dot com","$subject","$from","$body");

?>


<html>

<head>
</head>

<body>
.
.
.
Thank you for your message
.
.
.
</body>
</html>
Reply With Quote
  #3 (permalink)  
Old 06-21-2007, 11:09 AM
Senior Member
 
Join Date: May 2007
Posts: 267
Default

u can get a free Readymade contact form from internet
Reply With Quote
  #4 (permalink)  
Old 06-21-2007, 11:11 AM
Senior Member
 
Join Date: May 2007
Posts: 276
Default

Don't use that PHP! There's no error checking, or validation and it's wide open to being used as a platform for huge spam farms.
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 05:04 PM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.1.0