-
my first phph program need help
I am new to php and at the very beginning stages....I am doing a feeback form for a friend :
HERE IS THE HTML CODE
<html>
<head>
<title>ciscos feedbackform</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<form method="post" action="sendmail.php">
Name: <input name="name" type="text" /><br />
<br />
Age: <input name="age" type="text" /><br />
<br />
sex: <input name="sex" type="text" /><br />
<br />
Email: <input name="email" type="text" /><br />
<br />
<input type="submit" />
<input type="reset" name="reset" value="Reset">
</form>
</body>
</html>
AND HERE IS THE PHP PROGRAM I WROTE
<?
$name = $_REQUEST['name'] ;
$age = $_REQUEST['age'] ;
$sex = $_REQUEST['sex'] ;
$email = $_REQUEST['email'] ;
mail ( "tane@optusnet.com.au", "Ciscos form results","$name, $age, $sex, $email", "From: $email" ) ;
header( "Location: http://www.ciscoscoffeeroasters.com.au/thankyou.htm" );
?>
when i get the results sent to me in my email it comes to my email like this:
name,age,sex,email
Is there away of having the results sent to my email with question's that was asked and the answers instead of just the answers like above e.g
name = tane
age = 31
location = australia
email = tane@optusnet.com.au
-
You should be able to change this line
mail ( "tane@optusnet.com.au", "Ciscos form results","$name, $age, $sex, $email", "From: $email" ) ;
to this
mail ( "tane@optusnet.com.au", "Ciscos form results","name = $name\nage = $age\nsex = $sex\nemail = $email", "From: $email" );
Adam
-
You may want to use something more like the form processor in this thread: http://forums.webdeveloper.com/showt...&threadid=9543
-
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
|
Bookmarks