473,791 Members | 3,154 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

FeedBack Form

14 New Member
i have a code wherein it is asking email id and message from the user in the form named as feedback.html
HTML CODE AS BELOW[php]<html>
<body>
<form method="post" action="sendmai l.php">
Email: <input name="email" type="text" size="20" /><br />
Message:<br />
<textarea name="message" rows="15" cols="40">
</textarea><br />
<input type="submit" />
</form>
</body>
</html>[/php]THE ABOVE HTML CODE CALLS sendmail.php . wherein this accepts the emailid and message variable in php and sends mail.
PHP CODE AS BELOW[php]<?php
$email = $_REQUEST['email'] ;
$message = $_REQUEST['message'] ;

mail( "yourexample@ex ample.com", "Feedback Form Results",
$message, "From: $email" );
header( "Location: http://www.yoursite.co m/thanks.php" );
?>[/php]

in the above code yourexample@exa mple.com was my email address.
http://www.yoursite.com/thanks.php was having my clients site .

but the error is i havent recd any mail i my mailbox

anyone can help me please regarding this issue
Apr 9 '08 #1
15 2654
TheServant
1,168 Recognized Expert Top Contributor
Try use POST instead of REQUEST in your php form.

Also use the correct code tags when you post code in these forums!
Apr 9 '08 #2
nickyspace
14 New Member
Try use POST instead of REQUEST in your php form.

Also use the correct code tags when you post code in these forums!
hi

TheServant

thanks for replying .

but may i knw where did i made mistake in code tags.
Apr 9 '08 #3
ronverdonk
4,258 Recognized Expert Specialist
Please enclose your posted code in [code] tags (See How to Ask a Question).

This makes it easier for our Experts to read and understand it. Failing to do so creates extra work for the moderators, thus wasting resources, otherwise available to answer the members' questions.

Please use [code] tags in future.

MODERATOR
Apr 9 '08 #4
ronverdonk
4,258 Recognized Expert Specialist
Usually in programming you check results from commands. You have not done that.

So first check the result of the mail() function, print that and, when your mail is successfully sent without errors, and it does not arrive, look at the existence of the receiving mailbox.

Then come back.

Ronald
Apr 9 '08 #5
nickyspace
14 New Member
Usually in programming you check results from commands. You have not done that.

So first check the result of the mail() function, print that and, when your mail is successfully sent without errors, and it does not arrive, look at the existence of the receiving mailbox.

Then come back.

Ronald
i have tried to print the mail() . it has printed as 1. can you plz tell me what does 1 means in php for mail function
Apr 9 '08 #6
TheServant
1,168 Recognized Expert Top Contributor
i have tried to print the mail() . it has printed as 1. can you plz tell me what does 1 means in php for mail function
I am not sure, but 1 means true. So I am guessing that that means it sent the mail (provided you filled in the fields required).

Your mail() function should be like this tutorial. Have you tried to send it to your address? Did it come through?
Apr 9 '08 #7
nickyspace
14 New Member
I am not sure, but 1 means true. So I am guessing that that means it sent the mail (provided you filled in the fields required).

Your mail() function should be like this tutorial. Have you tried to send it to your address? Did it come through?
HI

thanks for always replying my mails , i'm really sorry for you again and again bothering for mail() .
i have gone through tutorials and used the phpmail code but i still didnt received any of the mails in my mail account.


The below code as follow[php]<html>
<body>
<?php
if (isset($_REQUES T['email']))
//if "email" is filled out, send email
{
//send email
$email = $_REQUEST['email'] ;
$subject = $_REQUEST['subject'] ;
$message = $_REQUEST['message'] ;
mail( "myemailid@exam ple.com", "Subject: $subject",
$message, "From: $email" );
echo "Thank you for using our mail form";
echo $email.$subject .$message;
}
else
//if "email" is not filled out, display the form
{
echo "<form method='post' action='feedbac k.php'>
Email: <input name='email' type='text' /><br />
Subject: <input name='subject' type='text' /><br />
Message:<br />
<textarea name='message' rows='15' cols='40'>
</textarea><br />
<input type='submit' />
</form>";
} ?>
</body>
</html>[/php]
help me regarding this code . b'coz using this code i still can't receive any mails in my mail box

if there is any wrong in code tag .i'm really sorry for that.
Apr 10 '08 #8
TheServant
1,168 Recognized Expert Top Contributor
Your form submission method has been changed to what I recommended, but your variables called by php ($email, $subject, $message) are still coming from a request ($_REQUEST['email'], $_REQUEST['subject'], $_REQUEST['message']).

You need to change your code to:
[PHP]$email = $_POST['email'] ;
$subject = $_POST['subject'] ;
$message = $_POST['message'] ;[/PHP]

Then it should work...
Apr 10 '08 #9
nickyspace
14 New Member
Your form submission method has been changed to what I recommended, but your variables called by php ($email, $subject, $message) are still coming from a request ($_REQUEST['email'], $_REQUEST['subject'], $_REQUEST['message']).

You need to change your code to:
[PHP]$email = $_POST['email'] ;
$subject = $_POST['subject'] ;
$message = $_POST['message'] ;[/PHP]

Then it should work...
hi
the servant

i'm really sorry but it still not working
i have changed from [php]
$email = $_REQUEST['email'];
$subject = $_REQUEST['subject'];
$message = $_REQUEST['message'];[/php]to[php]
$email = $_POST['email'] ;
$subject = $_POST['subject'] ;
$message = $_POST['message'] ;[/php]But it is still not working . I'm really upset why its not working because my module is getting delayed.
Apr 11 '08 #10

Sign in to post your reply or Sign up for a free account.

Similar topics

5
5113
by: Andrew | last post by:
Where can i find a free feedback form in php script to download it and put it in my website? thanks in advance andreas
1
4185
by: Kenneth McDonald | last post by:
I'm working on the 0.8 release of my 'rex' module, and would appreciate feedback, suggestions, and criticism as I work towards finalizing the API and feature sets. rex is a module intended to make regular expressions easier to create and use (and in my experience as a regular expression user, it makes them MUCH easier to create and use.) I'm still working on formal documentation, and in any case, such documentation isn't necessarily the...
2
5224
by: Mindful_Spirit | last post by:
I'm trying to set up a basic email feed back form like this, and was wondering about some basic configuration settings. I have used code from this website. I have it working just fine. I'm running IIS on my home machine. My problem is that I need to upload this stuff to a webhosting place and register a domain and I'm not sure what to put as the smtp mail server value
0
3517
by: starace | last post by:
I have designed a form that has 5 different list boxes where the selections within each are used as criteria in building a dynamic query. Some boxes are set for multiple selections but these list boxes do not necessarily need to have a selection made to be used in the dynamic query. In essence the form can have selections made in all or none of its list boxes to form the dynamic query I am looking to get some feedback in reference to...
6
2773
by: Patrick De Ridder | last post by:
I use a form with text boxes. The user enters data in the text boxes. The data is written away to a file. I wish to give the user feedback on the form, before the data is written away to the file - and (!) also before the user has finished entering all the data in remaining text boxes. How do I do this? Please give a short code example if you know the answer. Many thanks. --
0
1509
by: vijay | last post by:
hello friends, I have done one website by using frontpage 2005 and i have done the feedback form.Now I want to send this feedback form to email id.I have used mailto: in form tag but it is not working.so What is the solution.
4
2228
by: ianbarton | last post by:
Hello all I am trying to setup a feedback form on my webpage using some script provided by my ISP. I really don't know a lot about PHP and it's syntax etc. The feedback form only has 4 fields. These are UserName, UserEmail, UserCountry & Comments. It works well with all of those fields appearing in the body of an email that is sent to me. What I would now like is for the UserEmail field to appear in the "From:" field in the
1
1624
by: lali | last post by:
hi everybody, i am doing a project and i have strucked in middle of my code usiong asp. the problem is, in the feedback form there are many fields which are manidatory.when an user fills the form and clicks on submit button all the fields in the feedback form should be sent as the mail to the company who are providing feedback form can anybody help me out by giving me code?
9
2503
by: gs | last post by:
the feedback for the install of c#2008 places 97 to 99% cpu load for way too long on athlon x64 3800+ PC. 3/4 an hour later its only about 80% complete, continuing with 98% CPU load! Next time installing visual studio /dot product I will likely make sure no feedback
0
9669
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9517
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10207
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10156
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9030
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5435
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4110
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3718
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2916
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.