Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

HTML Forum


You are currently viewing our HTML Forum as a guest. Please register to participate.
Login



Post a Project »

Find a Professional HTML Freelancer!

Find a Freelancer to help you with your HTML projects

FREE Outsourcing eBook!

Reply
Old 12-07-2006, 05:38 PM PHP Form
McBone's Avatar
Super Talker

Posts: 149
Name: i have left
Location: i have left
Trades: 0
Hi me again, so I have talked the boss of this project im doing in using PHP, I have made the form, but the PHP file where the message logs isnt working, i keep getting an "email adress not verified"

Does anybody have the code for the reciever PHP file??

I need one where there are no mailing restictions, anyone can post from anywhere. And that will forward the message to the desired email account.

Thanks in advance guys and gals
McBone is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 12-07-2006, 07:37 PM Re: PHP Form
blackhawkpowers's Avatar
Ultra Talker

Posts: 313
Name: Dustin
Location: GA
Trades: 0
post the code you have for the handling form and we can take a peak at what's going on...
__________________
A patch is a piece of software which replaces old bugs with new bugs.

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
blackhawkpowers is offline
Reply With Quote
View Public Profile Visit blackhawkpowers's homepage!
 
Old 12-08-2006, 07:56 AM Re: PHP Form
McBone's Avatar
Super Talker

Posts: 149
Name: i have left
Location: i have left
Trades: 0
<?php



if ($_SERVER['REQUEST_METHOD'] != "POST"){exit;}



if(!(isset($_SERVER['HTTP_REFERER']) && !empty($_SERVER['HTTP_REFERER']) && stristr($_SERVER['HTTP_REFERER'],$_SERVER['HTTP_HOST']))){print "Please enable referrer logging to use this contact form. Your message was not sent."; exit;}



function new_line_check($a)
{

if(preg_match('`[\r\n]`',$a)){header("location: $_SERVER[HTTP_REFERER]");exit;}

}

new_line_check($_POST['Name']);



$disallowed_name = array(':',';','"','=','(',')','{','}','@');

foreach($disallowed_name as $value)
{

if(stristr($_POST['Name'],$value)){header("location: $_SERVER[HTTP_REFERER]");exit;}

}

new_line_check($_POST['Email']);

$disallowed_email = array(':',';',"'",'"','=','(',')','{','}');

foreach($disallowed_email as $value)
{

if(stristr($_POST['Email'],$value)){header("location: $_SERVER[HTTP_REFERER]");exit;}

}

$message = "";



foreach($_POST as $key => $value){if(!(empty($value))){$set=1;}$message = $message . "$key: $value\n\n";} if($set!==1){header("location: $_SERVER[HTTP_REFERER]");exit;}

$message = $message . "-- \nThank you ";
$message = stripslashes($message);

$subject = "Comments";
$headers = "From: " . $_POST['Email'] . "\n" . "Return-Path: " . $_POST['Email'] . "\n" . "Reply-To: " . $_POST['Email'] . "\n";

mail($my_email,$subject,$message,$headers);

?>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html>

<head>
<title>Help Request Form</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta http-equiv="Content-Language" content="en-uk">
</head>

<body bgcolor="#ffffff" text="#000000">

<div>
<center>
<font face="arial" size="2"><b>Thank you <?php print stripslashes($_POST['Name']); ?>!</b>
<br>Your message has been sent</font>
<p><font face="arial" size="2"><a href="<?php print "main.htm"; ?>">Click here to continue</a></font></p>
<p><font face="arial" size="2"></p>
</center>
</div>

</body>
</html>

the form is stardard run of the mill stuff, few boxes and a drop down, when i send it gives the thank you message but never arrives!

Im a little stuck now!! My html and java is ok, my PHP is poor as i found out!! lol

Thanks for your help!
McBone is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to PHP Form
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.16269 seconds with 12 queries