Dynadot Aftermarket: discover domain gems worth investing in. Visit our aftermarket.

Contact Us Script

SpaceshipSpaceship
Namecheap AuctionsNamecheap Auctions
Namecheap AuctionsNamecheap Auctions
Watch

Ice FX

Account Closed
Impact
0
I urgently need a Contact Us form to email script for my website, if anyone has a working one with all required files, I would be very grateful.

Thanks

Adam
 
0
Close
The views expressed on this page by users and staff are their own, not those of NamePros.
GoDaddyGoDaddy
Wrong section you want to head for programing.
 
0
Close
Code:
<?
/*
    CHFEEDBACK.PHP Feedback Form PHP Script Ver 2.01.


    $Id: phpscript.txt 1.1 2003/04/17 11:53:45 chris Exp $


*/

// ------------- CONFIGURABLE SECTION ------------------------


$mailto = '' ;

$subject = "" ;


$formurl = "" ;
$errorurl = "http://" ;
$thankyouurl = "http://" ;

// -------------------- END OF CONFIGURABLE SECTION ---------------

$name = $_POST['name'] ;
$email = $_POST['email'] ;
$comments = $_POST['comments'] ;
$http_referrer = getenv( "HTTP_REFERER" );

if (!isset($_POST['email'])) {
	header( "Location: $formurl" );
	exit ;
}
if (empty($name) || empty($email) || empty($comments)) {
   header( "Location: $errorurl" );
   exit ;
}

$messageproper =

	"This message was sent from:\n" .
	"$http_referrer\n" .
	"------------------------- COMMENTS -------------------------\n\n" .
	$comments .
	"\n\n------------------------------------------------------------\n" ;

mail($mailto, $subject, $messageproper, "From: \"$name\" <$email>\nReply-To: \"$name\" <$email>\nX-Mailer: chfeedback.php 2.01" );
header( "Location: $thankyouurl" );
exit ;

?>

save the above as feedback.php, you have to configurea bit near the top


HTML:
<form action="feedback.php" method="post">
          <table width="209" border="0" align="center" cellpadding="0" cellspacing="0">
            <tr> 
              <td width="88">Name:</td>

              <td width="121"><input type="text" name="name" class="form_login" size="34" /></td>
            </tr>
            <tr> 
              <td>Email:</td>
              <td><input type="text" name="email" class="form_login" size="34" /></td>
            </tr>
            <tr> 
              <td>comments:</td>
              <td><textarea cols="36"class="form_login" name="comments"></textarea></td>

            </tr>
            <tr> 
              <td colspan="2"><div align="center"> 
                  <input type="submit" value="Send" />
                  
                </div></td>
            </tr>
          </table>
        </form>

then save the above code in your contact form page
 
0
Close
I tested it by sending something to myself and it hasn't come through :(

Help?
 
0
Close
// ------------- CONFIGURABLE SECTION ------------------------


$mailto = ''[email protected]" ;

$subject = "TEST SUBJECT" ;


$formurl = "put the URL of your contact form here ie: http://www.yourdomain.com/contact.php" ;
$errorurl = "http://" ;
$thankyouurl = "http://" ;
 
0
Close
Thats what I did!, does the page that has the form on need to be php or can it be html?
 
0
Close
make it 2 pages, 1 php(1st code) 1 html(2nd code)
 
0
Close
HTML:
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>title</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

</head>

<body>

  <form action="feedback.php" method="post">

      
        <table border="0" align="center" cellpadding="0" cellspacing="0" summary="feedback form">

          <tr> 
              <td>Name:</td>
              <td> <input type="text"  name="name" size="27" /> 

              </td>
            </tr>
            <tr> 
              <td>Email address:</td>

              <td> <input type="text"  name="email" size="27" /> 
              </td>

            </tr>
            <tr> 
              <td height="203"> <p>Comments</p>
                <p> </p>
                <p> </p>
                <p> </p>

                <p> </p></td>
              
            <td> <textarea rows="10"  cols="25" name="comments"></textarea></td>

            </tr>
            <tr> 
              
            <td colspan="2"> <div align="center">
                <input type="submit" value="Send" />
              </div></td>
            </tr>
          </table>

        </form>

</body>

</html>

if you just use that it will be a form with no formatting or anything else

<?xml version="1.0" encoding="iso-8859-1"?> i think you may have missed that off at the top of the form, and the form has to be saves as php

basically just use your normal website page, shove that xml line at the very top and then put the table and form part of the code above where you want the form to be, then save it as contact.php and all should be fine
 
0
Close
just thought, for 20np if you send me your page ill put the form in it for you and get it to work
 
0
Close
Ok, but what if you cant get it working?
 
0
Close
then dont give me the 20np but i will get it working ive done it on 3 websites so far
 
0
Close
0
Close
http://www.fitnessfanatic.info/testcontact.php if you copy the code from that page it should be ok

also id think about changing your site to less images, if you learnt a bit of html you could reduce the size of your page a lot
 
0
Close
did it work?
 
0
Close
cool tony84 for helping him with the code.. PM me your php skills details and i may have some work for u..
 
0
Close
as much as id love to take credit for that script it came off hotscripts.com, im useless with php, although i will be learning it at uni after the christmas holidays. So i dont think i will be much use to you, sorry

still no np$ received :(
 
0
Close
Hey, I tried the one you posted and still no email :(
But i'll send you 10np for trying
 
0
Close
i got the email to my address, so do view source, save it as contact.php upload feedback.php and the contact.php and it will work
 
0
Close
I still havent got any email :(
 
0
Close
ok ill zip the files up exactly as you need them then just unzip them and upload them and it should work

EDIT:
i will need your email address but you can send that in a pm
 
0
Close
AIVikingsAIVikings

We're social

Escrow.com
Spaceship
Domain Recover
CryptoExchange.com

NamePros updates

A browser tab with a favicon next to the page title
Search members
You can now search for members by name, company, location and more. Open the search at the top of any page and choose Members. You will...
AIVikings
Catchy
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back