contact page with php<

liunx

Guest
hi, i got some php coding off a website so that i could create my own contact.php page so that visitors can email me.

the link is <!-- m --><a class="postlink" href="http://www.volvo-t5.co.uk/contact.php">http://www.volvo-t5.co.uk/contact.php</a><!-- m -->

the top form works fine (it uses the file 'sendemail.php')

the bottom form, however, does not seem to be working.
i changed the email address and named the file 'sendemail2.php'

can someone please look at the source code and tell me what i'm doing wrong?

thanksooops! i posted it in the wrong place by accident!

can someone please move it the the php section, thankswhen you say doesn't work how do you mean?

does it submit? if so what errros do you get?

works fine for me? do you not get the email?it submits ok, i even get the 'thank you' page, but i just dont get the email!!

its doesnt show any errorswell then we need to see the source of sendemail2.phphtml>
<head>
<title>Your message has been sent to VolvoT5.co.uk</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"></head>
<body bgcolor="#a6cbea">

<!-- You must enter YOUR email address ($myemail shown below).
Then you should check (or modify) the link for the 'next page' (at the bottom) -->

<?php
$myemail = "[email protected]";

if (!isset($visitormail))
echo "Somebody Goofed $ip" ;

$todayis = date("l, F j, Y, g:i a") ;

$subject = "Visitor Mail" ;

$message = " $todayis [EST] \n
Message: $notes \n
From: $visitor ($visitormail)\n
Additional Info : IP = $ip \n
Browser Info: $httpagent \n
Referral : $httpref \n
";

$from = "From: $myemail\r\n";

if ($myemail != "")
mail($myemail, $subject, $message, $from);

?>

<b><p align=center>
Date: <?php echo $todayis ?>
<br>
Thank You, yur message has been sent : <?php echo $visitor ?> ( <?php echo $visitormail ?> )
<br>
<?php echo $ip ?>

<br><br>
<a href=http://www.htmlforums.com/archive/index.php/"http://www.volvo-t5.co.uk/home.htm"> Home </a>

</body>
</html>well looks ok, but try this


<?php
$myemail = "[email protected]";

// not sure why thi sis here as it does nothing but show
// the visitor there IP.
if (!isset($visitormail)) {
echo "Somebody Goofed $ip" ;
exit;
}
$todayis = date("l, F j, Y, g:i a") ;

$subject = "Visitor Mail" ;

$message = " $todayis [EST] \n
Message: $notes \n
From: $visitor ($visitormail)\n
Additional Info : IP = $ip \n
Browser Info: $httpagent \n
Referral : $httpref \n
";

$from = "From: $myemail\r\n";

if ($myemail != ""){
mail($myemail, $subject, $message, $from);
}
?>nope that dont work, still dont get emails.so the emails are the same in both files?

if so then I don't know. something on hotmail side then.the top form is <!-- e --><a href="mailto:[email protected]">[email protected]</a><!-- e --> and bottom is <!-- e --><a href="mailto:[email protected]">[email protected]</a><!-- e -->

i have tried different emails with the second form, none work.well if the files are the same and you just changed the emails then the problem is either the server or where ever you send them. if you give it the webmaster email does it work like the top one?strangely enough it does work when i put the webmaster email in the sendemail2.php file!!!

is there a way around this so that it works will all email addys?well that is weird. it shouldn't matter what the email address is. is this on a host or local?yes its a host.thanks for all your help anyway scoutt, i'll just have to find another way of making a contact page.

:)i contacted my host and it said Hotmail were blocking emails from their servers or something.

all that messing around for nothing eh!!!

lol!Hotmail spam blocking? Maybe it thinks your message is spam.


edit errr didn't see your post before I posted.
 
Back
Top