NameSilo

Contact Us Script

SpaceshipSpaceship
SpaceshipSpaceship
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
•••
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
•••
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
•••
I tested it by sending something to myself and it hasn't come through :(

Help?
 
0
•••
// ------------- 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
•••
Thats what I did!, does the page that has the form on need to be php or can it be html?
 
0
•••
make it 2 pages, 1 php(1st code) 1 html(2nd code)
 
0
•••
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
•••
just thought, for 20np if you send me your page ill put the form in it for you and get it to work
 
0
•••
Ok, but what if you cant get it working?
 
0
•••
then dont give me the 20np but i will get it working ive done it on 3 websites so far
 
0
•••
0
•••
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
•••
did it work?
 
0
•••
cool tony84 for helping him with the code.. PM me your php skills details and i may have some work for u..
 
0
•••
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
•••
Hey, I tried the one you posted and still no email :(
But i'll send you 10np for trying
 
0
•••
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
•••
I still havent got any email :(
 
0
•••
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
•••
Dynadot โ€” .com TransferDynadot โ€” .com Transfer
CatchedCatched
Escrow.com
Spaceship
Domain Recover
CryptoExchange.com
Catchy
DomDB
NameFit
  • The sidebar remains visible by scrolling at a speed relative to the pageโ€™s height.
Back