Jump to content

[SOLVED] contact us form problems


HNX

Recommended Posts

everything is ok but when i click submit it says it is received yet i dont receive anything

 

<form action="send_mail.php" method="post" name="form1" id="form1">
<table width="100%" border="0" cellspacing="1" cellpadding="3">
<tr>
<td width="16%"><span class="style108">Subject</span></td>
<td width="2%"><span class="style104">:</span></td>
<td width="82%"><input name="subject" type="text" id="subject" size="50" /></td>
</tr>
<tr>
<td><span class="style108">Message</span></td>
<td><span class="style104">:</span></td>
<td><textarea name="detail" cols="50" rows="4" id="detail"></textarea></td>
</tr>
<tr>
<td><span class="style108">Name</span></td>
<td><span class="style104">:</span></td>
<td><input name="name" type="text" id="name" size="50" /></td>
</tr>
<tr>
<td><span class="style108">Email</span></td>
<td><span class="style104">:</span></td>
<td><input name="customer_mail" type="text" id="customer_mail" size="50" /></td>
</tr>
<tr>
<td> </td>
<td> </td>
<td><input type="submit" name="Submit" value="Submit" />
<input type="reset" name="Submit2" value="Reset" /></td>
</tr>
</table>
</form>

 

this is my code, i mean my form

 

and this is the send_mail file

<?php
@extract($_POST);
$name = stripslashes($name);
$email = stripslashes($email);
$subject = stripslashes($subject);
$text = stripslashes($text);
mail(' myemail@hotmail.com',$subject,$text,"From: $name <$email>");
echo("Thank you for your interest, your e-mail was sent.");
?>

 

but i dont know why it doesn't work......

 

please help,

HNX

Link to comment
Share on other sites

  • Replies 121
  • Created
  • Last Reply

Top Posters In This Topic

erm...

 

You might want to try

 

<?php

$name    = $_POST['name'];
$email    = $_POST['customer_email'];
$subject = $_POST['subject'];
$detail    = $_POST['detail'];

if(isset($_POST['Submit'])){
$name = stripslashes($name);
$email = stripslashes($email);
$subject = stripslashes($subject);
$text = stripslashes($text);

mail(' myemail@hotmail.com',$subject,$text,"From: $name <$email>");

echo("Thank you for your interest, your e-mail was sent.");
}
else
{
echo "form was not submitted";
}
?>

Link to comment
Share on other sites

euh i should replace my "send_mail" file with ur codings???? i mean is that what ur sggesting..btw im a total noob with php ive just recently started learning it:D

 

I Appreciate your "FREE" help,

HNx(some dudes just sent me an email sayin ill do it if u pay...)

Link to comment
Share on other sites

euh i should replace my "send_mail" file with ur codings???? i mean is that what ur sggesting..btw im a total noob with php ive just recently started learning it:D

 

I Appreciate your "FREE" help,

HNx(some dudes just sent me an email sayin ill do it if u pay...)

'

 

Oh, I am terribly sorry my friend, I misunderstood your question.

 

Is your problem not that your not receiving an email or what?

 

 

edit: Don't pay, PHP help section is free, tell the moron to go away.

Link to comment
Share on other sites

yes my problem is that i aint receiving any email when i fill my own contact form but i receive the message sayin ur message has been received Loll

 

Dont worry i aint payin Lol, i deleted their mails and ignored them Loll (money aint easy to earn, so cant spend so fast Lol)

 

Regards,

HNX

Link to comment
Share on other sites

yes my problem is that i aint receiving any email when i fill my own contact form but i receive the message sayin ur message has been received Loll

 

Dont worry i aint payin Lol, i deleted their mails and ignored them Loll (money aint easy to earn, so cant spend so fast Lol)

 

Regards,

HNX

 

try this,

 


<?php

if(isset($_POST['Submit'])){

$to = "YOUR HOTMAIL ADDRESS";
$subject = $_POST['subject'];
$message = "Hello! This is a simple email message.";
$from = $_POST['name'];
$headers = "From: $from";

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


echo "Thank you for your interest, your e-mail was sent.";
}
else
{
echo "form was not submitted";
}
?>

Link to comment
Share on other sites

yo dude thank you VERY much but there is one problem :s

 

no matter what i write as a comment i the same message everytime!! :| : "Hello! This is a simple email message."

 

 

try this

 

<?php

if(isset($_POST['Submit'])){

$to = "YOUR HOTMAIL ADDRESS";
$subject = $_POST['subject'];
$message = $_POST['detail'];
$from = $_POST['name'];
$headers = "From: $from";

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


echo "Thank you for your interest, your e-mail was sent.";
}
else
{
echo "form was not submitted";
}
?>

 

 

lol, I am glad to help you. I love it how I make people this happy, makes me happy :D

Link to comment
Share on other sites

ok nice ill try it right away (again....) Lol but ill tell u what happens in an hour Lol i got some other shit to fix i just hope ull still be one Mr. Whatever your name is:D

 

Thanks man, Thanks ALOT!!!! ur the best,

HNX

Link to comment
Share on other sites

JOEY!!!!!!!!!!!!!!!!! it works PERFECTLY!!!!!!!!!!!!!!!!!!! now isnt there a way to show the "received message thingy" in the same window???? cuz when i click on it to send it, a blank page comes and it says at the top that ur message has been received.... and instead i want only my contact page to change and let the website be. I mean i dont want it to go to a blank page Loll

 

Thanks in advance,

HNX(do u mind sharing emails?)

Link to comment
Share on other sites

Hey buddy,

 

Nah, it is normal for me not replying. I am currently training for my boxing match this week, I am in lightweight fighting this Brazilian kid. I am immensly busy my friend, so sorry for not being able to help.

 

I will check out what you need, and post back here in a minute or so. :D

Link to comment
Share on other sites

Alright, I read your little demand and all you have to do is change the action of your form.

 

I.E. <form action=".<?php echo $_SERVER['PHP_SELF']; ?>."></form>

 

Now, put the script I just fixed for you on the contact page...

 

 

edit:

 

try this

 

<?php

if(isset($_POST['Submit'])){

$to = "YOUR HOTMAIL ADDRESS";
$subject = $_POST['subject'];
$message = $_POST['detail'];
$from = $_POST['name'];
$headers = "From: $from";

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


echo "Thank you for your interest, your e-mail was sent.";
}
else
{
echo "form was not submitted";
}
?>

<form action=".<?php echo $_SERVER['PHP_SELF']; ?>." method="post" name="form1" id="form1">
<table width="100%" border="0" cellspacing="1" cellpadding="3">
<tr>
<td width="16%"><span class="style108">Subject</span></td>
<td width="2%"><span class="style104">:</span></td>
<td width="82%"><input name="subject" type="text" id="subject" size="50" /></td>
</tr>
<tr>
<td><span class="style108">Message</span></td>
<td><span class="style104">:</span></td>
<td><textarea name="detail" cols="50" rows="4" id="detail"></textarea></td>
</tr>
<tr>
<td><span class="style108">Name</span></td>
<td><span class="style104">:</span></td>
<td><input name="name" type="text" id="name" size="50" /></td>
</tr>
<tr>
<td><span class="style108">Email</span></td>
<td><span class="style104">:</span></td>
<td><input name="customer_mail" type="text" id="customer_mail" size="50" /></td>
</tr>
<tr>
<td> </td>
<td> </td>
<td><input type="submit" name="Submit" value="Submit" />
<input type="reset" name="Submit2" value="Reset" /></td>
</tr>
</table>
</form>

Link to comment
Share on other sites

I am turning 17, and delete send_mail.php, and put the script i gave you where your FORM is for sending your email.

Fiuh!! Lol ur not 54!! or something like that Loll HAHAHAH aight ok imma delete send mail put ur scripts in my form and ill tell u if i have any other problems

Link to comment
Share on other sites

yo it tells me

 

Not Found

The requested URL /.< was not found on this server.

 

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

Apache/1.3.39 Server at mydoMAINEname.net Port 80

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.