Current location: Hot Scripts Forums » Programming Languages » PHP » Newbie needs help using form mailer script


Newbie needs help using form mailer script

Reply
  #1 (permalink)  
Old 03-11-06, 03:21 AM
Charmaine99 Charmaine99 is offline
New Member
 
Join Date: Mar 2006
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Newbie needs help using form mailer script

Hello all,

This is my first post here - but I have a feeling it won't be my last.

I have just had to tackle my first contact form - well I haven't tacked it yet - but hopefully with your help. I'm using the PHP Form Mailer - phpFormMailer v2.1 script - have the following problem.

Whenever you first try to use the contact form - i.e. on first open of the browser you get the error message regardless, but if you then hit the back btn to try again it works fine.

Could it have something to do with the fact that the site is hosted through a c-panel thing (whateva that really means) and that the referrer bits are then stuffed up.

Any pointers would be really appreciated - I have exhausted google and tried deleting and modifying parts of the script with no luck at all. Please Help.

the contact form is www.diamondcreekestate.com.au/contact.htm and the php is here: www.diamondcreekestate.com.au/contact.php.

Is it easier for me to post the whole php bit in here?

I have already been told that I should be using php for the form validation but want to try to get past this first.

Thankyou. x
Reply With Quote
  #2 (permalink)  
Old 03-11-06, 04:14 AM
Charmaine99 Charmaine99 is offline
New Member
 
Join Date: Mar 2006
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Me again.

Looks like it is def this bit - not in live currently...

PHP Code:

$ref_page=$_SERVER["HTTP_REFERER"];

$valid_referrer=0;
if(
$ref_page==$valid_ref1$valid_referrer=1;
elseif(
$ref_page==$valid_ref2$valid_referrer=1;
if(!
$valid_referrer)
{
 echo 
"<script language=\"JavaScript\"><!--\n alert(\"$error_msg\");\n";
 echo 
"top.location.href = \"$valid_ref1\"; \n// --></script>";
 exit;

Variables:
PHP Code:

$valid_ref1="http://diamondcreekestate.com.au/contact.htm";// chamge "Your--domain" to your domain

$valid_ref2="http://diamondcreekestate.com.au";// chamge "Your--domain" to your domain
$replyemail="hlhale@ozemail.com.au";//change to your email address 
Help pls - i don't get it. Thanks.
Reply With Quote
  #3 (permalink)  
Old 03-11-06, 09:50 AM
mab's Avatar
mab mab is offline
Community VIP
 
Join Date: Oct 2005
Location: Denver, Co. USA
Posts: 2,674
Thanks: 0
Thanked 0 Times in 0 Posts
Include all of the actual URL in the variable (www was missing) -
PHP Code:

 $valid_ref1="http://www.diamondcreekestate.com.au/contact.htm"
__________________
Error checking, error reporting, and error recovery. If your code does not have these to get it to tell you why it is not working, what makes you think someone in a programming forum will be able to tell you why it is not working???
Reply With Quote
  #4 (permalink)  
Old 03-11-06, 07:35 PM
Charmaine99 Charmaine99 is offline
New Member
 
Join Date: Mar 2006
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Thanks for that mab... how special am I!
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
2 profitable script sites for sale cms-master.com General Advertisements 3 07-03-07 10:17 AM
Request: text form and image uploading script (PHP) YHIEddie Script Requests 0 03-18-05 05:22 PM
Form Script Help fizzgig JavaScript 2 01-06-05 11:24 AM
Passing form output more than 1 script iwpg Perl 5 09-07-04 04:46 PM
live chat script, form script, autoresponder, babalu Script Requests 0 12-04-03 01:55 PM


All times are GMT -5. The time now is 06:38 AM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.